In my IBM Cloud Private, I see several pause containers.
Can anyone explain the purpose of these? Normally, I can get to the bash shell in a running container but not the ones which are pause.
# docker ps | grep pause
ee5f3f6b9fc0 ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_catalog-catalog-apiserver-8qxrf_kube-system_3b4b107d-0b72-11e8-9f22-005056227136_0
d238dad0c5b8 ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_auth-apikeys-bk28g_kube-system_3b731880-0b72-11e8-9f22-005056227136_0
0196efb043ca ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_icp-router-htnhz_kube-system_3b8d25d3-0b72-11e8-9f22-005056227136_0
b09dc1759d09 ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_unified-router-bskb6_kube-system_3af9d44e-0b72-11e8-9f22-005056227136_0
8a392f174c24 ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_auth-pap-gfh7q_kube-system_3aa5b311-0b72-11e8-9f22-005056227136_0
0ac776eb9ced ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_platform-api-zr5pz_kube-system_3b2ce527-0b72-11e8-9f22-005056227136_0
107896ebfcd6 ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_icp-ds-0_kube-system_3a9200f8-0b72-11e8-9f22-005056227136_0
f95df5fbcc4a ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_image-manager-0_kube-system_3ae74f5c-0b72-11e8-9f22-005056227136_0
a9d30804f222 ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_auth-idp-h4fmt_kube-system_3ad78a99-0b72-11e8-9f22-005056227136_0
eaae55900637 ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_catalog-ui-jv9sq_kube-system_3af5cb32-0b72-11e8-9f22-005056227136_0
4ace18a84d8b ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_auth-pdp-9vhzx_kube-system_3ae0a074-0b72-11e8-9f22-005056227136_0
98b70f6074c7 ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_calico-policy-controller-5997c6c956-cx774_kube-system_39bfecef-0b72-11e8-9f22-005056227136_0
63a0340e3de8 ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_rescheduler-jqtd4_kube-system_3a6d4b05-0b72-11e8-9f22-005056227136_0
cace008e71b1 ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_kube-dns-9494dc977-7gwpx_kube-system_39a15b6b-0b72-11e8-9f22-005056227136_0
80a18b538ef3 ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_platform-ui-k5g7h_kube-system_3a98aad3-0b72-11e8-9f22-005056227136_0
bea43bfc8d70 ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_catalog-catalog-controller-manager-bd9f49c8c-4fqcp_kube-system_39653745-0b72-11e8-9f22-005056227136_0
f54f329e50ae ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_helm-api-5d8b6d6f9c-4rl2s_kube-system_396ade8d-0b72-11e8-9f22-005056227136_0
6812e3fee9cc ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_tiller-deploy-55fb4d8dcc-pcxbj_kube-system_396b0005-0b72-11e8-9f22-005056227136_0
69a840bc394b ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_helmrepo-5878d9d858-wlcrj_kube-system_396506a5-0b72-11e8-9f22-005056227136_0
03bc9ce0413d ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_heapster-5fd94775d5-28t6w_kube-system_396b0dd6-0b72-11e8-9f22-005056227136_0
8763167695b3 ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_filebeat-ds-amd64-q54pc_kube-system_9b8515d6-0b52-11e8-99a8-005056227136_1
461e5de11ee1 ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_calico-node-amd64-ql292_kube-system_53492619-0b51-11e8-99a8-005056227136_1
f73e2eb9dbaf ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_k8s-master-192.168.142.103_kube-system_c39080358687c72432da5f6de4b6fff9_1
c08f029af60e ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_k8s-mariadb-192.168.142.103_kube-system_6b640df7dae2cb064ebc450b273ce62a_1
0174b5c35963 ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_k8s-proxy-192.168.142.103_kube-system_b9f441de4995384d245d71fdb65e2cc2_1
f6befd10c479 ibmcom/pause:3.0 "/pause" About an hour ago Up About an hour k8s_POD_k8s-etcd-192.168.142.103_kube-system_a5150d8f6ee1f8047b05f9b2d5cbcaba_1
The 'pause' container is a container which holds the network namespace for the pod. Kubernetes creates pause containers to acquire the respective pod’s IP address and set up the network namespace for all other containers that join that pod.
You can access below links for details.
https://groups.google.com/forum/#!topic/kubernetes-users/jVjv0QK4b_o
yes, the pause container is part of each pod that is responsible to create shared network, assign ip address within the pod for all business containers inside this pod, also the pause container shared the volume for entire pod. If the pause container is dead, kubernetes consider the pod died and kill it and reschedule a new one.
If you docker stop the pause container, you would find that the Pod would have a new internal IP without any change in Restart count of the Pod. However, if you docker stop the container of the Pod, you would find the Pod status as Completed and then if you would docker start the same, you would find Pod in Running again with Restart count of the Pod incremented by 1 with no change in IP.
来源:https://stackoverflow.com/questions/48651269/what-are-the-pause-containers