Distinguish containerd, runc, and Client Tools · containerd
Different tools expose different APIs and responsibilities.
Learn with progress and quizzesFirst, understand the concepts.
Separate responsibilities
containerd manages images and container lifecycles. The OCI runtime runc handles process creation, while a shim mediates between running tasks and the daemon.
Choose the right tool
ctr is a low-level diagnostic client. nerdctl provides a Docker-like experience; crictl observes through the Kubernetes CRI API.
Version and configuration
Configuration versions and plugin names can differ between containerd 1.x and 2.x. config default prints defaults for the installed binary, not proof of the active daemon configuration.
Why it matters
Docker CLI, nerdctl, ctr, and crictl all concern containers, but do not necessarily use the same API or list the same objects. Start with socket and API identity.
Work through the reasoning
Connect the roles
containerd manages lifecycles and storage resources; runc executes processes according to OCI configuration. A shim sits between running tasks and the daemon. Clients have a different role from these components.
Fix the observation point
Record versions and sockets. ctr uses the containerd API, crictl uses CRI, and nerdctl provides Docker-like workflows. An empty list in one tool does not establish absence in another.
Learn by doing.
Use a personal Linux practice VM with containerd, runc, ctr, and sudo access. The nerdctl lab also needs nerdctl; the CRI lab needs crictl and a practice node with CRI enabled. Examples assume /run/containerd/containerd.sock; check the actual socket in other environments.
Inspect versions and plugins and print the beginning of the default configuration. Do not overwrite configuration or restart the daemon. Rootless setups use different socket and permission assumptions.
containerd --version
runc --version
sudo ctr version
sudo ctr plugins ls
containerd config default | sed -n "1,35p"How to check your result
Distinguish Client and Server in ctr version and read plugin status. For connection failures, check socket existence, permissions, and address. Do not record default configuration as the active configuration.
Apply what you learned
ctr lists objects but crictl cannot connect. Does that establish that containerd is entirely down?
Reveal the reasoning after trying
No. Check the CRI endpoint, plugin availability, and permissions separately. A responding containerd API and an available CRI API are different observations.
Ready to check your understanding?
Which tool diagnoses containers through the Kubernetes CRI API?
- Dockerfile
- crictl
- kubectl kustomize
- git
Reveal the reasoning after trying
crictl
crictl uses CRI. ctr and nerdctl use native containerd APIs, with different object models and visibility.
Official documentation · Distinguish containerd, runc, and Client Tools