我们一般将pod对象从创建至终这段时间范围成为pod的生命周期,它主要包含以下的过程:
pod创建过程
运行初始化容器(init container)过程
运行主容器(main container)
—->容器启动后钩子(post start)、容器终止前钩子(pre stop)
—->容器的存活性检测(liveness probe)、就绪性检测(readiness probe)
pod终止过程

01Pod相位
首先在介绍 Pod 的生命周期之前,我们先了解下 Pod 的状态,因为 Pod 状态可以反映出当前我们的Pod 的具体状态信息,也是我们分析排错的一个必备的方式。
我们可以通过命令kubectl explain pod.status查看到
[root@master ~]# kubectl explain pod.statusKIND: PodVERSION: v1.....phase <string>The phase of a Pod is a simple, high-level summary of where the Pod is inits lifecycle. The conditions array, the reason and message fields, and theindividual container status arrays contain more detail about the pod'sstatus. There are five possible phase values:Pending: The pod has been accepted by the Kubernetes system, but one ormore of the container images has not been created. This includes timebefore being scheduled as well as time spent downloading images over thenetwork, which could take a while. Running: The pod has been bound to anod
© 版权声明
文章版权归作者所有,未经允许请勿转载。如内容涉嫌侵权,请在本页底部进入<联系我们>进行举报投诉!
THE END














暂无评论内容