Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does kubernetes use the container pause-amd64 for?

Tags:

kubernetes

I set up the kubernetes cluster, and I found the pause-amd64:3.0 container on master or minion like this:

[root@k8s-minion1 kubernetes]# docker ps |grep pause
c3026adee957        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 22 minutes ago      Up 22 minutes                           k8s_POD.d8dbe16c_redis-master-343230949-04glm_default_ce3f60a9-095d-11e7-914b-0a77ecd65f3e_66c108d5
202df18d636e        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 24 hours ago        Up 24 hours                             k8s_POD.d8dbe16c_kube-proxy-js0z0_kube-system_2866cfc2-0891-11e7-914b-0a77ecd65f3e_c8e1a667
072d3414d33a        gcr.io/google_containers/pause-amd64:3.0           "/pause"                 24 hours ago        Up 24 hours                             k8s_POD.d8dbe16c_kube-flannel-ds-tsps5_default_2866e3fb-0891-11e7-914b-0a77ecd65f3e_be4b719e
[root@k8s-minion1 kubernetes]#

so what does k8s use this for ?

like image 332
J.Woo Avatar asked Mar 15 '17 09:03

J.Woo


People also ask

What is the use of pause container in Kubernetes?

Kubernetes uses pause containers to allow for worker containers crashing or restarting without losing any of the networking configuration. Kubernetes maintains a multi-architecture image that includes support for Windows. For Kubernetes v1. 25 the recommended pause image is registry.k8s.io/pause:3.6 .

What is the use of pause container?

Every Kubernetes Pod includes an empty pause container, which bootstraps the Pod to establish all of the cgroups, reservations, and namespaces before its individual containers are created. The pause container image is always present, so the pod resource allocation happens instantaneously as containers are created.

What is Docker pause container?

Description. The docker pause command suspends all processes in the specified containers. On Linux, this uses the freezer cgroup. Traditionally, when suspending a process the SIGSTOP signal is used, which is observable by the process being suspended.

How do you pause deployment in Kubernetes?

Kubectl Rollout Pause Kubernetes enable you to pause a Deployment. You can then make adjustments to the Deployment and resume it. Deployments do not need to be paused to make a change. Use pause to pause a Deployment so that you can calmly make several changes ( that are kept in a queue till resume is ordered ).


1 Answers

It's part of the infrastructure. This container is started first in all Pods to setup the network for the Pod.

It does nothing after the Pod has started.

Here is the source code.

like image 52
Janos Lenart Avatar answered Sep 17 '22 20:09

Janos Lenart