Cloud Native 7 min read

Why Docker Is Deprecated in Kubernetes and What to Use Instead

Kubernetes has removed Docker support by deprecating the dockershim bridge, urging users to adopt CRI‑compatible runtimes such as containerd or CRI‑O, and explaining the differences between CRI and OCI runtimes, their security implications, and migration recommendations.

Architecture Digest
Architecture Digest
Architecture Digest
Why Docker Is Deprecated in Kubernetes and What to Use Instead

Kubernetes has officially deprecated Docker support; the dockershim module that bridged Docker’s API to the Container Runtime Interface (CRI) is being removed, and future releases will no longer provide this bridge.

The deprecation stems from Docker’s lack of native CRI support and the maintenance burden of the bridge, as well as security concerns caused by unused Docker networking and storage features.

In a Kubernetes cluster, Docker (or any container runtime) is only used by kubelet to launch containers on nodes via the CRI. Since Kubernetes communicates exclusively through the CRI, a dedicated CRI runtime is now required.

Two primary CRI runtime implementations are recommended:

containerd – a lightweight runtime that originated from Docker, fully compatible with Docker’s image format and providing a complete CRI implementation; ideal for straightforward migration from Docker.

CRI‑O – developed by Red Hat, a minimalistic runtime that does not depend on Docker and is used in OpenShift; it focuses solely on the CRI without extra components.

Both runtimes are open‑source and can be inspected on GitHub ( https://github.com/containerd/containerd/ and https://github.com/cri-o/cri-o ).

Understanding the distinction between CRI and OCI runtimes is essential:

CRI runtime – receives gRPC requests from kubelet, translates them into OCI‑compatible JSON specifications, and forwards them to an OCI runtime.

OCI runtime – uses Linux kernel features (cgroups, namespaces) to actually create containers; examples include runC and gVisor.

OCI runtimes like runC execute directly on the host kernel, which can expose the host to vulnerabilities if the runtime is compromised. gVisor adds a “guest kernel” layer to isolate containers further, though it may have performance trade‑offs and limited compatibility.

In summary, Docker is no longer supported in Kubernetes; users should transition to a CRI runtime such as containerd (for Docker‑compatible workloads) or CRI‑O (for minimal, Docker‑free environments). Additionally, a clear grasp of the roles of CRI and OCI runtimes helps in making informed decisions about security, performance, and workload requirements.

Relevant links:

https://gvisor.dev/docs/

https://gvisor.dev/docs/user_guide/compatibility/

cloud nativeDockerKubernetescontainerdCRIcri-o
Architecture Digest
Written by

Architecture Digest

Focusing on Java backend development, covering application architecture from top-tier internet companies (high availability, high performance, high stability), big data, machine learning, Java architecture, and other popular fields.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.