我拉取了一个nginx:1.13.3镜像,正常发布没有问题,可以通过kubectl port-forward nginx-pod-1.13.3 8080:80这种方式查看到,然后我docker exec进去修改了index.html里面的内容提交为新的镜像后,用新的镜像重新发布,
显示没有问题,但是我用kubectl port-forward nginx-pod-1.13.3beta 8080:80后localhost:8080访问不到
麻烦您给讲解一下
apiVersion: v1
kind: Pod
metadata:
name: nginx-pod-1.13.3beta
labels:
app: nginx-test
version: 1.13.3
spec:
containers:
- name: nginx
image: nginx:1.13.3beta
command: [ "/bin/bash", "-c", "--" ]
args: [ "while true; do sleep 30; done;" ]
ports:
- containerPort: 80