Pod & Infrastructure container

Exploring what a running pod is

]# docker ps | grep pause
9220b8d70a54        k8s.gcr.io/pause:3.1                                                                                  "/pause"                 17 minutes ago      Up 17 minutes                           k8s_POD_kubia-z92dc_default_cb20846a-706e-11e9-ba83-001e67d8acca_0
2c5420ea4edf        k8s.gcr.io/pause:3.1                                                                                  "/pause"                 17 minutes ago      Up 17 minutes                           k8s_POD_kubia-mf8dj_default_cb1f8b78-706e-11e9-ba83-001e67d8acca_0

This pause container is actually the container that holds all the containers of a pod together.

The pause container is actually an infrastructure container whose sole(唯一) purpose is to hold all these namespaces. All other user-defined containers of the pod then use the namespaces of the pod infrastructure container.

在这里插入图片描述
Figure: A two-container pod results in three running containers sharing the same Linux namespaces

Actual application containers may die and get restarted. When such a container starts up again, it needs to become part of the same namespaces as before. The infrastructure container makes this possible since its lifecycle is tied to that of the pod - the container runs from the time the pod is scheduled until the pod is deleted. If the infrastructure pod is killed in the meantime(在此期间), the Kubelet recreates it and all the pod’s containers.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值