概述
apiVersion: v1
kind: Pod
metadata:
name: two-containers
spec:
restartPolicy: Never
volumes:
- name: shared-data
hostPath:
path: /data
containers:
- name: nginx-container
image: nginx
volumeMounts:
- name: shared-data
mountPath: /usr/share/nginx/html
- name: debian-container
image: debian
volumeMounts:
- name: shared-data
mountPath: /pod-data
command: ["/bin/sh"]
args: ["-c", "echo Hello from the debian container > /pod-data/index.html"]
[root@dock01 ~]# kubectl get pod two-containers
NAME READY STATUS RESTARTS AGE
two-containers 0/2 ContainerCreating 0 75s
[root@dock01 ~]# kubectl get pod two-containers -o wide
NAME READY STATUS RESTARTS
最后
以上就是故意小海豚为你收集整理的two-containers 1/2 NotReady 有个容器退出了的全部内容,希望文章能够帮你解决two-containers 1/2 NotReady 有个容器退出了所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复