root@ubuntu:~# kubectl logs antrea-busybox root@ubuntu:~# kubectl logs antrea-busybox --previous root@ubuntu:~# kubectl get pods NAME READY STATUS RESTARTS AGE antrea-busybox 0/1 CrashLoopBackOff 6 8m29s debian-6c44fc6956-ltsrt 0/1 CrashLoopBackOff 6 7m33s my-deployment-68bdbbb5cc-bbszv 0/1 ImagePullBackOff 0 18d my-deployment-68bdbbb5cc-nrst9 0/1 ImagePullBackOff 0 18d my-deployment-68bdbbb5cc-rlgzt 0/1 ImagePullBackOff 0 18d my-nginx-5dc4865748-jqx54 1/1 Running 2 18d my-nginx-5dc4865748-pcrbg 1/1 Running 2 18d nginx 0/1 ImagePullBackOff 0 18d web2-6d784f67bf-4gqq2 1/1 Running 0 2d18h
原来是yaml文件有问题,改成如下
apiVersion: v1 kind: Pod metadata: name: mc1 spec: volumes: - name: html emptyDir: {} containers: - name: 1st image: nginx volumeMounts: - name: html mountPath: /usr/share/nginx/html - name: 2nd image: debian volumeMounts: - name: html mountPath: /html command: ["/bin/sh", "-c"] args: - while true; do date >> /html/index.html; sleep 1; done
状态是run了
root@ubuntu:~# kubectl get pods NAME READY STATUS RESTARTS AGE debian-6c44fc6956-ltsrt 0/1 CrashLoopBackOff 9 25m mc1 2/2 Running 0 70s my-deployment-68bdbbb5cc-bbszv 0/1 ImagePullBackOff 0 18d my-deployment-68bdbbb5cc-nrst9 0/1 ImagePullBackOff 0 18d my-deployment-68bdbbb5cc-rlgzt 0/1 ImagePullBackOff 0 18d my-nginx-5dc4865748-jqx54 1/1 Running 2 18d my-nginx-5dc4865748-pcrbg 1/1 Running 2 18d nginx 0/1 ImagePullBackOff 0 18d web2-6d784f67bf-4gqq2 1/1 Running 0 2d18h root@ubuntu:~#