containerd and Container Runtimes

containerd is the industry-standard container runtime daemon that manages the complete container lifecycle, from image pull and storage through execution and supervision. Understanding its internal architecture, the OCI specifications it implements, and how Kubernetes communicates with it through CRI is essential for any senior DevOps or platform engineering role.

Overview

Overview

containerd began as an internal component inside Docker. It was donated to the CNCF in 2017 and graduated as a top-level CNCF project in 2019.

It is now the default container runtime in most Kubernetes distributions, including EKS, GKE, AKS and kubeadm-provisioned clusters. It replaced dockershim, which was removed from the kubelet in Kubernetes 1.24.

Two kinds of client reach it, and below containerd the path to a running process is the same for both.

Key concepts

  • OCI Image Spec vs OCI Runtime Spec
  • containerd-shim-runc-v2 and Shim Architecture
  • Kubelet CRI gRPC Call Sequence
  • Snapshotters: overlayfs, devmapper, and native
  • nerdctl vs Docker CLI
  • ctr for containerd Debugging
  • containerd Content Store and Garbage Collection

Interview questions

  • Walk me through the complete stack of what happens when you run docker run nginx on a modern Linux machine with Docker 24+ installed.
  • What is the purpose of the containerd shim, and what happens if you kill it while a container is running?
  • Describe the exact sequence of CRI gRPC calls that the kubelet makes to containerd when scheduling a new Pod with two containers.
  • What are the key differences between nerdctl and docker CLI, and when would you choose one over the other?
  • How does the containerd snapshotter differ from Docker's storage driver model, and what problems does the snapshotter design solve?

Sign up free to read the full topic

More DevOps topics

Start free on Cariara · Coding problems · System design studio