Container Runtime Interface
The Container Runtime Interface (CRI) is the gRPC API the Kubernetes kubelet uses to talk to container runtimes such as containerd and CRI-O. It lets Kubernetes work with any compliant runtime.
What CRI standardises
Kubernetes does not start containers itself. The kubelet calls a runtime through CRI to pull images, create pod sandboxes, and start and stop containers. Any runtime that implements CRI can plug in, so Kubernetes is not tied to one vendor.
Why Docker support was removed in Kubernetes 1.24
Docker Engine does not implement CRI, so Kubernetes shipped a built-in adapter called dockershim. Maintaining it duplicated what containerd, which Docker itself uses, already offered through CRI. Kubernetes removed dockershim in version 1.24. Images built with Docker are OCI images and run unchanged on containerd or CRI-O. If you still need Docker Engine as a runtime, the separate cri-dockerd adapter exists.
Common CRI runtimes
- containerd: the most common runtime, used by many managed Kubernetes services.
- CRI-O: built specifically for Kubernetes, common in OpenShift.
- gVisor and Kata Containers: sandboxed runtimes, selectable per workload through runtime classes.
Inspect the runtime
kubectl get nodes -o wide # CONTAINER-RUNTIME column: containerd://1.7.xcrictl ps # CRI-aware debugging on a nodecrictl imagescrictl logs <container-id>RememberYou still build and push images with Docker. Only the node-level runtime changed.
Frequently Asked Questions
Why did Kubernetes need CRI?
Early Kubernetes had Docker-specific code in the kubelet. CRI defines one gRPC API so any compliant runtime can be used the same way, which decoupled Kubernetes releases from a single runtime.
Did removing dockershim break Docker-built images?
No. Docker images follow the OCI image format and run on containerd and CRI-O. Only the daemon used on the node changed, which matters mainly for workloads that mount the Docker socket.
How do I see which runtime my cluster uses?
Run kubectl get nodes -o wide and read the CONTAINER-RUNTIME column. On a node, crictl lets you list containers and images through CRI.