LIVEΒ·The trends shaping tomorrow's world.
Future Tech

Kubernetes vs Docker

Docker builds and runs containers; Kubernetes orchestrates them across a cluster. How they relate, what removing dockershim changed, and when to use each.

Docker is a toolset for building container images and running containers, mainly on a single host. Kubernetes is a platform for running containerized workloads across a cluster of machines: scheduling them, restarting them when they fail and rolling out new versions [1]. They are not direct competitors. A common workflow builds images with Docker and runs them on Kubernetes, which since v1.24 has used CRI-compatible runtimes such as containerd rather than Docker Engine on its nodes [7][8].

This article focuses on how the two relate. For what containers are and how they differ from VMs, see Containers vs Virtual Machines. For the components inside a cluster, see Kubernetes Architecture Explained.

Two tools at two different layers

A useful mental model is a shipping operation. Docker is the packing station: it builds standard containers and can run them on one dock. Kubernetes is the port authority: it decides which ship each container goes on, replaces lost ones and reroutes when a ship breaks down.

More precisely:

  • Docker Engine is "an open source containerization technology for building and containerizing your applications." It runs as a client-server application: a long-running daemon called dockerd, APIs, and the docker command-line client. The daemon "creates and manages Docker objects, such as images, containers, networks, and volumes" [2].
  • Kubernetes is "a portable, extensible, open source platform for managing containerized workloads and services that facilitate both declarative configuration and automation." Google open-sourced it in 2014 [1].

The Kubernetes documentation is explicit about what it does not do: it "does not deploy source code and does not build your application" [1]. Building images is left to other tools, and Docker is the most familiar one.

What "Docker" actually means

Part of the confusion is that "Docker" names several things. The Kubernetes project's 2020 explainer put it this way: "the thing we call 'Docker' isn't actually one thingβ€”it's an entire tech stack, and one part of it is a thing called 'containerd,' which is a high-level container runtime by itself" [6].

The pieces that matter for this comparison:

Piece

What it does

docker CLI and docker build

The developer interface for building images and running containers

Docker Engine (dockerd)

The daemon that manages images, containers, networks and volumes on a host [2]

containerd

The industry-standard runtime underneath; Docker Engine 29.0 and later uses the containerd image store by default on fresh installs [5]

Docker Compose

Defines and runs multi-container applications from one YAML file [3]

Swarm mode

Docker's built-in clustering for a group of Docker Engines [4]

The images Docker builds are not Docker-specific. As the Kubernetes project explains, "the image that Docker produces isn't really a Docker-specific imageβ€”it's an OCI (Open Container Initiative) image," and any OCI-compliant image "will look the same to Kubernetes" [6].

What Kubernetes adds on top

Running one container on a laptop is easy. Running hundreds across dozens of machines, through failures and deployments, is the problem Kubernetes solves. Its documentation lists the capabilities [1]:

  • Service discovery and load balancing: expose containers by DNS name or IP and spread traffic.
  • Storage orchestration: mount local or cloud storage automatically.
  • Automated rollouts and rollbacks: move from the current state to a declared desired state "at a controlled rate."
  • Automatic bin packing: place containers onto nodes based on their CPU and memory needs.
  • Self-healing: restart failed containers, replace them, and kill those that fail health checks.
  • Secret and configuration management: update secrets and configuration without rebuilding images.

Docker Engine on a single host doesn't do these things across machines. That is the real difference.

The dockershim story: what changed and what didn't

The headline "Kubernetes dropped Docker" caused years of confusion. Here is what happened, according to the Kubernetes project's own records.

The interface. The kubelet, the agent on each node, talks to the container runtime through the Container Runtime Interface (CRI), which "defines the main gRPC protocol for the communication between the node components kubelet and container runtime" [10]. The CRI lets the kubelet use "a wide variety of container runtimes, without having a need to recompile the cluster components" [10].

The problem. "Docker isn't compliant with CRI," the Kubernetes team wrote in December 2020. "If it were, we wouldn't need the shim" [6]. Kubernetes carried a built-in adapter, the dockershim, so the kubelet could drive Docker Engine, which itself used containerd underneath. That was an extra component to maintain.

The timeline.

  • Kubernetes v1.20 (December 2020): dockershim deprecated [6].
  • Kubernetes v1.24 (released May 3, 2022): "After its deprecation in v1.20, the dockershim component has been removed from the kubelet in Kubernetes v1.24" [8].
  • Kubernetes v1.26 onward: the kubelet requires runtimes that support the v1 CRI API; if a runtime doesn't, "the kubelet will not register the node" [9][10].

What didn't change.

  • Your images. "Yes, the images produced from docker build will work with all CRI implementations," says the removal FAQ [7].
  • Docker as a developer tool. "This doesn't mean the death of Docker," the 2020 post said; Docker "is still a useful tool for building containers" [6].
  • Docker Engine as a node runtime, if you want it. Mirantis and Docker committed to maintaining an adapter called cri-dockerd, which lets the kubelet connect to Docker Engine through the CRI [7]. The Kubernetes setup docs, for v1.37 as of November 2026, still list containerd, CRI-O, Docker Engine (via cri-dockerd) and Mirantis Container Runtime [9].

What did break. Anything that relied on the Docker socket inside the cluster. The 2020 post warned that workflows using /var/run/docker.sock, often called "Docker in Docker," would stop working on other runtimes, and pointed to alternatives such as kaniko, img and buildah for building images in-cluster [6].

Kubernetes vs Docker at a glance


Docker (Engine, CLI, Compose)

Kubernetes

Primary job

Build images; run containers

Orchestrate containers across a cluster

Scope

One host (Compose: one host, many containers)

Many nodes

Builds images?

Yes (docker build)

No: "does not build your application" [1]

Self-healing across machines

No

Yes [1]

Scheduling and bin packing

No

Yes [1]

Configuration

CLI flags, Dockerfile, Compose YAML [3]

Declarative API objects, usually YAML

Built-in clustering

Swarm mode [4]

Core purpose

Learning curve

Low

Steep

Typical use

Local development, CI builds, single-server apps

Production fleets, multi-team platforms

Where Docker Swarm and Compose fit

If you want the closer comparison, it is Kubernetes vs Docker Swarm mode, Docker's own orchestrator. Docker describes Swarm mode as "built into the Docker Engine" for "natively managing a cluster of Docker Engines called a swarm," with no separate orchestration software required [4]. Docker's docs also caution not to confuse it with the older standalone Docker Classic Swarm, "which is no longer actively developed" [4].

Docker Compose is a single-file way to define and run multi-container applications, and Docker says it works in production, staging, development, testing and CI [3]. Compose is a natural fit for local development. Docker also documents "Compose Bridge," which transforms Compose configuration into files for other platforms, including Kubernetes [11].

A typical workflow using both

  1. A developer writes a Dockerfile and runs the application locally with docker compose up.
  2. CI builds the image with docker build (or another OCI-compliant builder) and pushes it to a registry.
  3. A Kubernetes Deployment references that image. The kubelet on each node asks its CRI runtime, typically containerd or CRI-O, to pull and run it [10].
  4. Kubernetes keeps the declared number of replicas running, rolls out updates and restarts failures [1].

Docker never touches the production nodes in that flow, and the image runs unchanged. That is the OCI standard doing its job [6][7].

Benefits of each

Docker: fast local feedback, a simple mental model, the widely used Dockerfile format, and Compose for multi-service local setups.

Kubernetes: resilience across machine failures, declarative rollouts, efficient packing of workloads and a common platform offered as managed services such as AKS, EKS and GKE [6].

Limitations and risks

Docker alone: no cross-host scheduling or self-healing. A single-server Docker setup is a single point of failure. Docker Desktop also carries licensing terms: Docker states that commercial use of Docker Engine obtained via Docker Desktop in larger enterprises (more than 250 employees or more than $10 million in annual revenue) requires a paid subscription, as of November 2026 [2]. Docker Engine itself is Apache 2.0 licensed [2].

Kubernetes: operational complexity is real. You need to understand networking, storage, security policies, upgrades and observability. For a handful of services, it can be more platform than you need. Consider managed Kubernetes or serverless containers if your team is small.

How to choose

  • One developer, local work: Docker (and Compose). No Kubernetes needed.
  • A small application on one or two servers: Docker with Compose, or a managed container service, is often enough.
  • Many services, multiple teams, high availability requirements: Kubernetes, ideally managed.
  • You already know Docker and want light clustering: Swarm mode exists, but weigh how widely each orchestrator is supported by your cloud provider and tools.
  • In all cases: keep building OCI images. They run on Docker, Kubernetes and most managed container platforms.

Whatever you run, manage the cluster and its configuration as code. See Infrastructure as Code Explained.

Outlook

The layers are now clearly separated: build tools produce OCI images, CRI runtimes run them, and Kubernetes orchestrates. Even Docker Engine has moved closer to containerd, making its image store the default on fresh installs from version 29.0 [5]. We expect the "versus" framing to keep fading as teams treat Docker as a developer tool and Kubernetes as a runtime platform.

Frequently asked questions

Does Kubernetes still support Docker?

Kubernetes no longer includes dockershim, removed in v1.24 [8]. Images built with Docker still run on every CRI runtime [7]. If you want Docker Engine itself on your nodes, you can use the cri-dockerd adapter, which Mirantis and Docker maintain [7][9].

Do I need Docker to use Kubernetes?

No. Kubernetes needs a CRI-compatible runtime on each node, such as containerd or CRI-O [9]. You need some tool to build OCI images, and Docker is a common choice, but alternatives exist.

Is Kubernetes replacing Docker?

No. They do different jobs. Kubernetes replaced Docker Engine only as the default node runtime path, and even that was a change in plumbing, not a change in the images or developer workflow [6].

What is the difference between Docker Compose and Kubernetes?

Compose defines and runs multi-container applications from one YAML file, typically on a single host [3]. Kubernetes runs workloads across a cluster with scheduling, self-healing and rolling updates [1]. Many teams use Compose for local development and Kubernetes in production.

What is containerd?

containerd is a container runtime that Docker's stack uses underneath and that Kubernetes can use directly through the CRI. The Kubernetes project described it as "a high-level container runtime by itself" [6], and Docker calls it "the industry-standard container runtime" [5].

Sources

  1. Kubernetes, "Overview." https://kubernetes.io/docs/concepts/overview/
  2. Docker, "Docker Engine." https://docs.docker.com/engine/
  3. Docker, "Docker Compose." https://docs.docker.com/compose/
  4. Docker, "Swarm mode." https://docs.docker.com/engine/swarm/
  5. Docker, "containerd image store." https://docs.docker.com/engine/storage/containerd/
  6. Kubernetes Blog, "Don't Panic: Kubernetes and Docker," December 2, 2020. https://kubernetes.io/blog/2020/12/02/dont-panic-kubernetes-and-docker/
  7. Kubernetes Blog, "Updated: Dockershim Removal FAQ," February 17, 2022. https://kubernetes.io/blog/2022/02/17/dockershim-faq/
  8. Kubernetes Blog, "Kubernetes 1.24: Stargazer," May 3, 2022. https://kubernetes.io/blog/2022/05/03/kubernetes-1-24-release-announcement/
  9. Kubernetes, "Container Runtimes." https://kubernetes.io/docs/setup/production-environment/container-runtimes/
  10. Kubernetes, "Container Runtime Interface (CRI)." https://kubernetes.io/docs/concepts/architecture/cri/
  11. Docker, "Compose Bridge." https://docs.docker.com/compose/bridge/