logo

What is the pause container?

pause is the first process (PID=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.

Source Code

The source code can be found on Github: https://github.com/kubernetes/kubernetes/tree/master/build/pause

If you check the build/pause/linux/pause.c file, you will find that it is indeed just a pause, in an infinite loop:

  for (;;)
    pause();

Where to find the pause containers?

Use ctr to list the containers, and you will find many pause containers:

$ ctr --namespace k8s.io container ls

Note that pause containers are not visible to crictl.