Migrate from dockershim to containerd or CRI-O

Nodes still running Docker Engine through dockershim must move to another container runtime before the cluster upgrades past 1.23. This page explains what maps cleanly, how to switch nodes one at a time, and where the work usually stalls.

On this page

Migrate from dockershim to containerd or CRI-O before the next upgrade

Dockershim was removed from Kubernetes in v1.24, so a cluster whose nodes still run Docker Engine through dockershim must move every node to another runtime before the control plane can move past that point. The runtime switch itself is node-by-node work: drain a node, change its container runtime to containerd or CRI-O, bring it back, and confirm it is Ready before moving to the next. The larger effort sits in finding what depends on Docker before the first node changes. Scope scales with node count and with how much node-level tooling touches the Docker socket, such as monitoring agents, log shippers, CI build hosts, backup jobs and custom scripts that call the docker CLI.

Start with an inventory. For each node, record the runtime and version, the operating system and init system, and every host process or workload that mounts the Docker socket or calls Docker directly. Check image build pipelines that run on cluster nodes, since they may depend on Docker-specific behavior that containerd and CRI-O do not provide. Decide whether each dependency is rewritten for the CRI runtime, moved to an image builder that runs outside the node, or handled by cri-dockerd, which keeps Docker Engine in use through a CRI shim. Each path carries different maintenance costs, so record the choice per node pool.

Settle the cgroup driver before the first node is switched. Kubernetes advises the systemd cgroup driver when systemd is the init system and when cgroup v2 is in use, and the kubelet and runtime must agree on the driver. A mismatch is one of the more common causes of nodes that fail to become Ready after the switch. Confirm the runtime version against the Kubernetes container runtime requirements for your target release, and test one non-production node with the same OS image before changing production. Ask your partner or internal team for a scoped estimate built from your own node inventory, the number of Docker-dependent workloads and tooling, and the number of distinct node pools, since no supplied figure applies to your environment.

What maps cleanly from Docker Engine to containerd or CRI-O

This table compares the Docker Engine functions that workloads and node tooling depend on with their equivalents under containerd or CRI-O. Read the Replacement column first: items marked as replacement tooling need new software or changed processes, while configuration-only items need settings changes on the node. The main takeaway is that pod execution moves across cleanly, but anything that talks to the Docker socket or Docker CLI must be found and rewritten before the node is switched.

AreaDocker Engine on the nodecontainerd or CRI-O equivalentReplacement needed?
Pod executionkubelet runs pods through dockershim and the Docker daemonkubelet calls the runtime directly through the CRI interfaceNo, configuration only
Image pulls and registry credentialsCredentials from the Docker config file are used by kubeletCredentials must be set in the runtime config or passed through imagePullSecretsConfiguration change, confirm each registry
LoggingContainer logs routed through the Docker logging driverLogs written by the kubelet to files; the runtime logging driver differsCheck log shippers that read Docker logs
Docker socket accessPods or agents mount /var/run/docker.sockThe Docker socket is not part of the CRI interface and does not exist under containerd or CRI-OYes, replacement tooling required
Docker CLI in scripts and toolingMaintenance scripts call docker ps, docker logs or docker execUse crictl for node-level inspection; equivalent commands differYes, rewrite scripts
Docker Compose or Docker-in-Docker build jobs on nodesCI jobs run Compose or nested Docker on the same nodeNeither runtime provides Docker Engine; builds need a separate builder such as BuildKit or a rootless toolYes, move the build pipeline
cgroup driverDocker typically configured with the cgroupfs or systemd driverKubernetes documents the systemd cgroup driver when systemd is the init system and when using cgroup v2Configuration change, match kubelet and runtime

Documented paths for moving off Docker Engine

Kubernetes documents two CRI runtimes for this change, containerd and CRI-O, and a transition option for keeping Docker Engine through cri-dockerd. The cards below cover the references to start from, the node-by-node procedure and the setup steps that differ by runtime.

Start from the migration guide

The Kubernetes migrating from dockershim guide is the primary reference for this change. It explains that clusters using Docker Engine through dockershim must move to another runtime, or find another way to keep Docker Engine support, before upgrading past v1.24. Read it against your own cluster version before you plan node work, since the guide's steps assume your control plane and kubelet versions are known. Confirm the exact upgrade sequence with your distribution vendor if you run a packaged cluster.

Migration guide

Choose between containerd and CRI-O

The container runtimes page lists containerd and CRI-O as the documented CRI runtimes. containerd is the runtime most Docker users already have on their hosts, so it is often the smaller change, while CRI-O is tied closely to the Kubernetes release line. Decide per cluster based on your distribution's default, your node image pipeline and the runtime versions your vendor supports. Ask your vendor which runtime versions they test with each Kubernetes minor release.

Container runtimes docs

Keep Docker Engine with cri-dockerd

cri-dockerd is an option for teams that need Docker Engine during a transition, because it provides a CRI interface on top of Docker Engine. Treat it as a stopgap rather than a long-term target, and check the cri-dockerd project and your Linux distribution for current support status before you depend on it. Confirm that your monitoring agents, build tooling and image workflows still work through the same Docker daemon after the change.

Drain and uncordon nodes one at a time

kubectl drain evicts workloads from a node so the runtime can be swapped without downtime for every replica at once, and kubectl uncordon returns the node to scheduling after it is healthy. Move one node at a time, confirm pods reschedule and pass readiness, and watch PodDisruptionBudgets so drains are not blocked indefinitely. Set a clear rollback point for each node, since a failed runtime switch is easiest to reverse before the next node is touched.

Set up nodes with kubeadm

For kubeadm-built clusters, the runtime is set on each node before it rejoins the cluster, so the node image or configuration management role should carry the runtime endpoint. Rejoin nodes with the same kubeadm version your control plane runs, within the supported version skew. Check that the kubelet points at the new runtime socket and that the node reports Ready. Ask your team to rebuild nodes from a tested image rather than editing each host by hand.

Runtime setup steps

Each node is verified before the next one moves

The loop starts with an inventory of anything that calls the Docker socket, then fixes one runtime for each node pool. Each node is cordoned and drained, its kubelet runtime endpoint and cgroup driver are changed, and the node services are restarted. Before the node is uncordoned, confirm it reports Ready and its workloads start. A node that fails this check returns to its previous runtime setting, and the investigation finishes before the next node in the pool is touched.

Per-node loop with a rollback branch before the next node moves.

Sequence for switching nodes one by one with a parallel run

This sequence moves each node pool from Docker Engine to containerd or CRI-O while a pilot pool proves the new runtime, so every cutover happens after the workloads have already run cleanly elsewhere. The result is a cluster where Docker Engine is removed only after the last node is verified.

  1. Inventory every node and its runtime

    The cluster owner records each node, its node pool, its Kubernetes version, its operating system and the container runtime reported by the kubelet. Nodes are grouped by pool so that each group can be drained and cut over as a unit. The output is a signed-off table that shows which nodes still use Docker Engine through dockershim and which pools carry stateful or GPU workloads that need extra scheduling care. Confirm the list against the live cluster, not against infrastructure tags alone.

  2. Find Docker socket and CLI dependencies

    The platform team searches DaemonSets, Deployments, CI runner configurations, host scripts and monitoring agents for mounts of the Docker socket, calls to the Docker CLI, and assumptions about Docker-specific paths or image storage. Each dependency is assigned an owner and a fix, such as switching a log or image-build workload to a runtime-neutral tool. The closing check is a written list in which every item is either fixed, scheduled for change or explicitly accepted, with the owner named. Any workload that builds images through the host daemon needs its own build path before its node pool is cut over.

  3. Build a pilot pool on containerd or CRI-O

    The team provisions one new node pool with the chosen runtime, containerd or CRI-O, and configures the cgroup driver to match the node operating system, using the systemd driver where systemd is the init system and cgroup v2 is in use. Node labels and taints mirror the existing pool so the scheduler can place test workloads in the same way. The step closes when the pilot nodes join the cluster, report Ready, and pass a node-level check of the runtime version and cgroup settings. Confirm the runtime and driver against the Kubernetes container runtime guidance for your distribution.

  4. Run representative workloads on the pilot pool

    Representative workloads, including a stateful service, a workload with node-level log collection, a job, and one application that previously used the Docker CLI, are scheduled to the pilot pool while the original pool keeps serving production traffic untouched. Operators compare logs, resource usage, image pulls, probe behavior and monitoring metrics between the two pools for the same workloads. The step is complete when the pilot pool runs the sample set with no regressions that the owners accept in writing. Any failure is traced back to the dependency list from the earlier step rather than patched on the node.

  5. Cut over each pool with drain and uncordon

    For each remaining pool, operators cordon a node, drain it so that pods reschedule onto nodes already running the new runtime, and then confirm the node comes back on containerd or CRI-O before moving to the next node. PodDisruptionBudgets and the scheduling capacity of the remaining nodes determine how many nodes can be drained at once, so the team checks both before each window. The step closes when every node in the pool reports the new runtime, workloads are back to their expected replica counts, and the change record lists the time and operator for each node. Stop the pool and investigate if a drain stalls on a workload that cannot move.

  6. Confirm the control plane upgrade path

    Before the last pool is cut over and before any control plane upgrade is planned, the platform team checks the Kubernetes version skew policy against the current cluster version. The kube-apiserver must be upgraded one minor version at a time and ahead of the kubelets, and kubelets may be up to three minor versions older than the API server. The team confirms that the chosen runtime version is supported on the target Kubernetes release and records the next upgrade stop. The output is a short plan that ties the runtime change to the next scheduled version change so that the two do not collide in the same window.

  7. Decommission Docker Engine after the last node verifies

    Only after every node in every pool reports containerd or CRI-O and the workload checks have passed, the team removes Docker Engine from the node images or configuration management, removes any remaining socket mounts, and updates the node build templates so that new nodes never install Docker Engine. Operators verify that no node reports a dockershim-based runtime and that CI runners and host scripts still work without the daemon. The step closes with a signed change record listing the final node inventory, the runtime version on each pool, and the owners who accepted the remaining dependency changes.

Choosing containerd, CRI-O or cri-dockerd for each node pool

containerd is a CRI runtime that Kubernetes documents as a supported container runtime, and it is the most common choice for teams that want a general-purpose runtime without a Docker daemon in the path. It usually fits clusters where the distribution already ships containerd as the default, and where the operations team is comfortable managing its configuration file and registry settings directly.

  • Node changes: Install and configure containerd on each node, set the systemd cgroup driver when systemd is the init system, and confirm the kubelet points at the containerd socket before draining the node.
  • Image and tooling compatibility: Images built with Docker remain runnable because they are OCI images, but tools that call the Docker socket, such as some CI runners and monitoring agents, must be rewritten or moved to a different interface.
  • Registry and mirror configuration: Plan registry mirrors, authentication and any private certificate authorities in the containerd configuration, since air-gapped clusters depend on them for every image pull.
  • Distribution fit: Confirm with your distribution vendor which containerd version it certifies, and whether it manages containerd config for you or expects manual edits that an upgrade could overwrite.

Before choosing containerd, ask the distribution vendor which containerd versions it supports, who owns the runtime configuration during upgrades, and how node images or bootstrap scripts are updated when the runtime changes.

What drives the cost and duration of the runtime switch

This table compares the cost components of moving nodes off Docker Engine, who carries each one, whether it is one-time or recurring, and what pushes it up or down. Read it as a checklist for scoping an internal effort or a partner quote, then use the quote column to ask for the same line items from every bidder.

Cost driverWhat moves itOne-time or recurringWhat to request in a quote
Node count and pool layoutMore nodes and more distinct pools (GPU, edge, stateful) multiply drains, validation and rollback stepsOne-time for the cutover, recurring when new pools are addedPer-pool node list with roles, OS and hardware, and the batch size proposed for each pool
Workloads touching the Docker socket or CLIPods that mount /var/run/docker.sock, run docker build or call the Docker CLI on nodes need rework or a new pathOne-time inventory and reworkInventory method, list of affected workloads and whether the quote includes code or manifest changes
Custom node images and bootstrap scriptsImages with Docker baked in, hardcoded runtime settings or Docker-specific units must be rebuilt and retestedOne-time rebuild, recurring image maintenanceOwnership of image pipeline, rebuild steps and who approves new node images
Distributions and kubelet configurationsEach distribution, kubelet config file and cgroup driver setting adds a separate test pathOne-time testing per variant, recurring when configs driftCount of distributions and configuration variants covered and how drift is detected
Change windows and drain constraintsStateful workloads, PodDisruptionBudgets and limited maintenance windows set the pace of node-by-node movesOne-time scheduling, may recur for later node rotationsAgreed windows, rollback criteria and the maintenance calendar the plan depends on
Monitoring and logging agent coverageAgents that read Docker logs, container paths or Docker stats need checks on containerd or CRI-O before cutoverOne-time test; recurring when agents are upgradedTest matrix for each agent, including the version tested and the log and metric paths verified
Team skills for the chosen runtimeLack of experience with crictl, containerd configuration or CRI-O troubleshooting lengthens incidentsOne-time training or onboarding, recurring on-call loadTraining scope, runbooks delivered and whether support hours are included after cutover
Ongoing runtime patchingRuntime security fixes and minor version updates must be applied on each node pool on a scheduleRecurringPatch cadence, who applies it, and how node image rebuilds are tested before rollout

What usually goes wrong during the runtime switch and how to prevent it

Most failures in a dockershim migration are not caused by the new runtime itself. They come from things that quietly depended on Docker: sockets, cgroup settings, registry credentials, drain behavior and monitoring paths. Each card below names one of these risks and the check that catches it before a node pool is switched.

Hidden Docker socket dependencies

Some CI runners, build jobs, log shippers and admin tools mount the Docker socket at /var/run/docker.sock and call it directly. After a node moves to containerd or CRI-O, those jobs can fail without a clear error, or they can keep working on a node that still runs Docker and break later. Before cutover, audit pod specs, Helm values and CI definitions for hostPath mounts of the Docker socket, and confirm each consumer has a replacement such as a rootless builder or a runtime-native API.

Migration guide

Cgroup driver mismatches on nodes

If the kubelet and the container runtime use different cgroup drivers, the kubelet may fail to start or the node may never report Ready. Kubernetes advises the systemd cgroup driver when systemd is the init system and when cgroup v2 is in use, so the setting must match on both sides. Check the kubelet configuration and the runtime configuration on a pilot node first, and confirm the value survives a node reimage or a configuration management run.

Runtime setup docs

Docker-only registry and logging settings

Image pull secrets, registry mirrors, proxy variables and log rotation were often configured in /etc/docker/daemon.json or in Docker systemd drop-ins. containerd and CRI-O read their own configuration files, so these settings do not carry over automatically. Inventory every Docker-specific file on the node, recreate the equivalent runtime configuration, and test a pull from each private registry on the pilot pool before moving the next pool.

Stateful pods that fail during drain

Draining a node to switch its runtime restarts every pod on it. Databases, message brokers and other stateful workloads may lack a PodDisruptionBudget, may use node-local volumes, or may take longer to recover than the drain timeout allows. Review PodDisruptionBudgets and volume topology for stateful sets, drain one node at a time, and confirm each stateful workload is healthy before the next node is cordoned.

Monitoring agents reading Docker paths

Node exporters, log collectors and security agents sometimes read Docker-specific paths such as container metadata directories or the Docker stats endpoint. After the switch, these agents can report empty container metrics or no logs while the node still looks healthy. Verify that each agent reads from the containerd or CRI-O paths, and build a dashboard check for container counts and log volume on the pilot pool so silent gaps are visible.

Rushing the next upgrade

Teams sometimes move directly from a dockershim-era node pool to the next Kubernetes upgrade without confirming that every node runs the new runtime. The version skew policy allows kubelets to be up to three minor versions older than kube-apiserver, which can hide mixed states that look acceptable until a later step. Keep the rollback path documented for each pool, record which runtime every node uses, and do not start the next minor version upgrade until every node verifies.

Version skew policy

How the cgroup driver setting affects node stability

The cgroup driver decides which component creates and manages the control groups that cap CPU and memory for pods and system services on each node. The kubelet and the container runtime must use the same driver. If they disagree, the node can show resource accounting that does not match what the kernel enforces, and pods may be evicted or fail to start under pressure in ways that look like application problems. After you move a node from Docker Engine to containerd or CRI-O, the runtime configuration changes, so this alignment has to be checked again on every node, not assumed from the old setup.

The Kubernetes container runtimes guidance advises the systemd cgroup driver when systemd is the init system and when the node uses cgroup v2. Before you choose a value, check the init system (for example, with ps -p 1 -o comm=) and the cgroup version the kernel exposes on each node. Then confirm that the cgroupDriver field in the kubelet configuration and the matching setting in the runtime config (for containerd, the SystemdCgroup option under the runc runtime; for CRI-O, the cgroup_manager option) both point to the same driver. Treat these as values to verify against the current runtime documentation for your versions, since defaults and key names have changed across releases.

Do not mix drivers across a node pool. A pool where some nodes use cgroupfs and others use systemd makes behavior depend on which node a pod lands on, which is difficult to diagnose during an incident. Standardize the setting per pool, record it in your node build template, and check it during each node's migration. Nodes that also need cgroup v1 to v2 changes should be handled in the same planning window, because the driver choice depends on the cgroup version. The sibling topic on migrating Kubernetes nodes from cgroup v1 to cgroup v2 covers the kernel, runtime and kubelet requirements for that move.

Questions teams ask before moving off Docker Engine

How much does a dockershim to containerd or CRI-O migration cost?

Cost is driven mostly by labor, not software, because containerd and CRI-O are open source and carry no license fee. The main line items are inventory and dependency discovery, node-by-node change work, validation of workloads and monitoring agents, and any rework of tooling that talks to the Docker socket. Cost rises with node count, the number of clusters, how many distinct node images or OS builds you run, and how many teams must sign off on changes. Most of the work is one-time, though the runtime itself then becomes part of your ongoing patching and upgrade routine. Ask any partner for a written scope that lists each of these components, the number of clusters and node pools covered, and which environments are included for testing before production.

How long does moving nodes off Docker Engine take?

The duration depends on how many clusters and node pools you run, how much your workloads depend on Docker-specific behavior, and how quickly change windows can be booked. Nodes are normally switched one at a time so workloads can reschedule, which makes the schedule a function of your drain and change-control process as much as the technical steps. Dependency discovery in a complex estate often takes longer than the node changes themselves. Confirm the timeline against your own environment, including the change calendar, the number of approval cycles and the time needed to test your heaviest workloads, rather than relying on a generic figure.

What does our internal team need to provide before the migration starts?

Plan to supply four things before work begins:

  • A current node inventory, with cluster, node pool, OS, kernel, Kubernetes version and container runtime for each node
  • Administrative access to clusters, nodes and the image registry, plus access to CI pipelines that build or push images
  • Agreed change windows and a rollback decision owner for each cluster
  • A named owner for each workload or namespace who can confirm behavior and sign off on tests

Without workload owners, dependency discovery stalls, because the people who know whether a service uses the Docker socket are rarely the people who run the nodes.

Can our own platform team do the dockershim migration without a partner?

Yes, many teams do this in-house, since the official migration guide and the container runtime documentation describe the steps. The questions to answer honestly are whether your team has spare capacity during change windows, has tested node drains and runtime changes before, and can test workloads that depend on Docker-specific behavior such as privileged build jobs, Docker-in-Docker, or host monitoring agents. If the answer is unclear, a scoped assessment of dependencies is a common first step. Whichever path you choose, document the cgroup driver setting and the runtime version on every node.

Is cri-dockerd a safe long-term option for keeping Docker Engine?

cri-dockerd is a shim that lets kubelet talk to Docker Engine after dockershim was removed, so it keeps the Docker dependency in place rather than removing it. Kubernetes documents containerd and CRI-O as container runtimes, which makes them the primary paths to plan for. Treat cri-dockerd as a transitional option only if your workloads depend on Docker Engine features that cannot yet be replaced. Before choosing it, confirm the current support status, the versions it supports, and who maintains it in your environment, because support and compatibility must be checked against each Kubernetes release you plan to run.

What should we check before upgrading a cluster past 1.23?

Confirm that no node still depends on dockershim, because dockershim was removed in Kubernetes v1.24 and clusters using Docker Engine through it must migrate to another runtime or find another route to Docker Engine support before upgrading. Check every node pool, including spare and autoscaled pools, since a node missed in the inventory can block the upgrade path. Also verify that your kubelet configuration, cgroup driver and runtime versions match what you intend to run, and that monitoring, logging and security agents work with the new runtime. The official migration guide is the right reference for the exact version gates.

What happens to images we built with Docker?

Images built with Docker are normally OCI-compliant and will run under containerd or CRI-O without rebuilding, because the runtime pulls and runs images from the registry rather than from the Docker daemon. What changes is the build path: if your CI jobs use the Docker socket on the node to build images, those jobs need a different builder, such as a rootless or daemonless build tool, and the build pipeline must be tested separately. Confirm that your registry, signing and scanning tools accept the images, and test any image that relies on Docker-specific runtime behavior before the cutover.

How DeployOpen scopes and delivers the runtime migration

DeployOpen plans and delivers the move from Docker Engine to a CRI runtime inside your own infrastructure, starting with an inventory of what depends on the Docker socket. Each engagement is fixed-scope, with the node order, cgroup settings and verification steps agreed in writing before any node is changed.

How we scope

  • Inventory of clusters, node pools and Kubernetes versions still running Docker Engine through dockershim
  • Review of workloads, DaemonSets and agents that mount the Docker socket or call Docker directly
  • Written scope naming the target runtime, containerd or CRI-O, and the node order for the rollout

How we build

  • Runtime installation and kubelet configuration on a non-production node pool first, with the cgroup driver set to match the host init system
  • Node-by-node cutover with cordon, drain and rollback steps, so each node is verified before the next one moves
  • Checks on logs, image pulls, monitoring agents and node health, with any cri-dockerd use documented as a temporary path

How we hand over

  • Runbook covering the runtime configuration, cgroup driver settings and per-node change record
  • Updated inventory of socket dependencies, with remediation status for each workload or agent found
  • Walkthrough with your platform and security engineers so they can repeat the procedure on remaining clusters

How we support

  • Post-migration review of node health and workload behavior after the upgrade path resumes
  • Ongoing support, upgrades and continuous testing are available as a retainer after handover
  • Confirm with your team which Kubernetes version you plan to run next, since the version skew policy governs the sequence

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.