Skip to main content
Every Kubernetes Pod contains a small, often invisible helper process called the pause container. It usually does not appear in the output of kubectl get pods, because that command lists Pods (not each container inside them). The pause container is typically the first container the kubelet or container runtime starts for a Pod and the last one to stop. Its sole job is to hold the Pod’s network namespace stable for the lifetime of the Pod.

Why Kubernetes needs a pause container

To understand the pause container, first recall what a Pod is: A Pod is a tightly coupled group of containers that share certain namespaces and resources: On Linux, these networking and namespace shares are implemented using a network namespace. The kernel retains a network namespace only while it is owned by a running process; otherwise it is garbage-collected. Because application containers can crash, restart, or be recreated, Kubernetes needs a stable process that outlives transient container restarts to hold that namespace open. That stable process is the pause container.

How the pause container is used (lifecycle)

  1. The kubelet asks the container runtime to create a new Pod.
  2. The runtime creates a network namespace for the Pod.
  3. The CNI/network plugin configures that namespace and assigns an IP address.
  4. The runtime starts the pause container inside the newly created network namespace.
  5. Application containers are started and join the same namespace as the pause container.
Because the pause container is a simple, long-running process that normally never exits, it becomes the stable owner of the network namespace. Typical pause images are tiny (often under 1 MB) and only run a minimal wait-loop. Minimal pause process example

Practical implications

  • Stable Pod IP: If an application container crashes and is restarted, the pause container keeps running and retains the network namespace and Pod IP. The restarted container rejoins the same namespace and the Pod keeps the same IP.
  • Pod teardown on pause termination: If the pause container itself is killed or removed, the kubelet must tear down the Pod. That involves stopping other containers, creating a fresh pause container, asking the CNI plugin for a (possibly different) IP, and starting the application containers again. This can change the Pod IP and disrupt in-Pod networking temporarily.
Quick tips and commands
  • To inspect containers at the runtime level you can use runtime-specific tools (for CRI-O/containerd: crictl ps -a; for Docker: docker ps --filter "ancestor=k8s.gcr.io/pause"), which will often list the pause container for a Pod.
  • Pause image examples: k8s.gcr.io/pause is a common pause image used in many Kubernetes distributions.
The pause container is not shown by kubectl get pods because that command lists Pods (not individual containers). If you inspect container runtimes directly (for example with runtime-specific tools), you will often see the pause container listed for the Pod.
References

Watch Video