What is containerd?
containerd is the industry-standard container runtime that powers Docker and Kubernetes. This guide explains what containerd is, its architecture, why it matters, and how it fits into the cloud-native ecosystem.
containerd is a high-level container runtime that manages the complete container lifecycle on a single host. It handles image distribution, storage, container execution, and network management. Originally built by Docker and later donated to the Cloud Native Computing Foundation (CNCF), containerd is the most widely adopted container runtime in the industry.
Unlike Docker (which is a complete platform), containerd focuses solely on being a reliable, efficient runtime. It's designed to be embedded in larger systems, making it the perfect choice for Kubernetes and other orchestration platforms. containerd is OCI-compliant, meaning it can run any OCI-compatible container image.
containerd has a modular architecture designed for flexibility and extensibility. It consists of several core components that communicate via gRPC:
containerd became a CNCF (Cloud Native Computing Foundation) project in March 2017 and achieved graduation status in February 2019. CNCF graduation is a significant milestone that indicates maturity, stability, and widespread adoption.
To graduate, a project must demonstrate: widespread production use, a healthy number of maintainers from multiple organizations, clear governance, and adherence to the CNCF code of conduct. containerd met all these criteria and joined the ranks of Kubernetes, Prometheus, and Envoy as a graduated CNCF project.
containerd is fully compliant with the Open Container Initiative (OCI) standards. OCI defines two specifications:
- OCI Image Specification - Defines the format of container images
- OCI Runtime Specification - Defines how to run a container
This compliance ensures that any OCI-compliant image can run on containerd, and containerd can use any OCI-compliant runtime (like runc, Kata Containers, or gVisor).
# OCI Runtime flow
Container image (OCI format)
↓
containerd (image distribution, storage)
↓
runc (OCI runtime - creates and runs container)
↓
Linux Kernel (namespaces, cgroups)
- OCI Image Support - Pull, push, and manage OCI images from any registry.
- Container Lifecycle Management - Create, start, stop, pause, and delete containers.
- Snapshot Management - Multiple snapshot drivers (overlayfs, devicemapper, zfs, btrfs).
- Content Distribution - Efficient image pulling with content-addressable storage.
- CRI Plugin - Seamless integration with Kubernetes.
- Metrics and Monitoring - Prometheus metrics endpoint for observability.
- gRPC API - Programmatic access to all containerd functions.
- Namespace Isolation - Multi-tenancy support with namespaces.
- Rootless Mode - Run containers without root privileges.
# Install containerd on Ubuntu/Debian
sudo apt-get update
sudo apt-get install -y containerd
# Install containerd on CentOS/RHEL
sudo yum install -y containerd
# Start the containerd service
sudo systemctl enable containerd
sudo systemctl start containerd
# Verify installation
sudo systemctl status containerd
containerd --version
# Generate default configuration
sudo mkdir -p /etc/containerd
containerd config default | sudo tee /etc/containerd/config.toml
# Restart after configuration changes
sudo systemctl restart containerd
containerd comes with two main CLI tools:
- ctr - The native containerd CLI for debugging and low-level operations.
- nerdctl - A Docker-compatible CLI that makes containerd feel like Docker.
# Using ctr (minimal - for debugging)
ctr image pull docker.io/library/nginx:alpine
ctr container create docker.io/library/nginx:alpine nginx
ctr task start nginx
# Using nerdctl (Docker-like - recommended)
nerdctl pull nginx:alpine
nerdctl run -d -p 80:80 --name web nginx:alpine
nerdctl ps
nerdctl logs web
nerdctl exec -it web sh
nerdctl stop web
nerdctl rm web
containerd is a critical component of the cloud native ecosystem. It sits at the core of the container stack:
containerd is the foundation of modern container infrastructure. Understanding it is essential for any cloud-native engineer.