kubelet Depends on containerd Through the CRI Socket

In progress Kubernetes Linux

The kubelet on each node doesn't run containers itself: it asks a container runtime, usually containerd, through the Container Runtime Interface (CRI), a gRPC API served on a Unix socket. When the runtime stops answering, the kubelet has nothing to manage pods with and the whole node drops out of the cluster.

What Happens When a Pod Lands on a Node

  1. The kubelet calls the CRI on /run/containerd/containerd.sock.
  2. containerd pulls the image, prepares the filesystem layers (OverlayFS), the cgroups and the network namespace.
  3. containerd starts the container through a low-level runtime (runc).

Kubernetes removed its built-in Docker support (dockershim) in version 1.24; any runtime that speaks CRI works, containerd being the most common.

Two Settings That Must Match

containerd and the kubelet must use the same cgroup driver. On a systemd-based distribution that's systemd: in /etc/containerd/config.toml, SystemdCgroup = true. With two different managers handling the same cgroups, the node becomes unstable under resource pressure.

The Dependency Spiral

If containerd crashes (a full disk, a filesystem gone read-only), the CRI socket disappears. The kubelet can't list or start containers, loops on errors, and stops reporting: the node turns NotReady, then Unknown, and its pods are rescheduled elsewhere.

References

Review cards

Flashcard Why must `containerd` and the kubelet use the same cgroup driver?

Using the same cgroup driver ensures that both components can manage the containers effectively, preventing instability under resource pressure.

Flashcard What happens if `containerd` crashes and the CRI socket disappears?

The kubelet can't list or start containers, it loops on errors, and eventually stops reporting, causing the node to turn NotReady, then Unknown, and its pods are rescheduled elsewhere.