How to Upgrade containerd 1.7 to 2.x Before Kubernetes 1.38 (Tested)
The Kubernetes 1.38 sneak peek, published on 23 November, says the kubelet will take its cgroup driver only from the container runtime. containerd 1.7 cannot answer that question, so any node still on 1.7 is on a clock. Release day is planned for 16 December 2026. containerd 1.7 has been end of life since 30 September.
Yesterday's 1.38 beta test ran on containerd 2.3.4 and could not show the 1.7 case. So today I ran containerd 1.7.36, 2.3.7 and 2.4.2 one after another on the same root directory, with a deliberately old config. This guide is the result: what breaks, what quietly changes, and the order I would do it in on real nodes.
What I tested, and what I did not
Everything ran in one privileged kindest/base container on Docker Desktop (Linux 6.10, arm64, cgroup v2), using the official release tarballs with their SHA-256 sums checked. Kubernetes was not involved. I talked to containerd directly with ctr and with crictl 1.36, the same CRI calls the kubelet makes. I did not run Pods, because that needs CNI and a systemd-managed cgroup tree the container does not have. Treat the Pod-level parts below as from the docs, not from my run.
| Version | Role in the test | Support status (containerd RELEASES.md) |
|---|---|---|
| 1.7.36 | The node as it is today | End of life 30 Sep 2026 |
| 2.3.7 | Recommended target | LTS until 30 Apr 2028 |
| 2.4.2 | Latest | Active until 16 May 2027 |
Why 2.3 and not 2.0: containerd 2.0 is also LTS, but its extended support runs only to March 2027 and the release notes say it is focused on Kubernetes 1.33 on GKE. The containerd team also tests and supports a direct jump from one LTS to the next, and 1.7 to 2.3 is exactly that.
Step 1: Find the nodes and their configs
Start with the inventory. The runtime version is on every Node object:
kubectl get nodes -o custom-columns=NAME:.metadata.name,RUNTIME:.status.nodeInfo.containerRuntimeVersion,KUBELET:.status.nodeInfo.kubeletVersion \
| awk 'NR==1 || /containerd:\/\/1\./'
Then, on one node from each pool, check the config version and what containerd itself thinks is deprecated. ctr deprecations list exists on 1.7 and records every deprecated setting the running daemon has seen:
grep -E '^\s*version\s*=' /etc/containerd/config.toml
containerd --version
sudo ctr deprecations list
My test config was a typical node config of the kind that collects over years of image builds. It is version 2, uses SystemdCgroup = true, sets sandbox_image, uses the old CRI registry.mirrors block for Docker Hub, sets CNI bin_dir, turns on enable_cdi and sends traces with the old otlp plugin settings. On 1.7.36, ctr deprecations list flagged two of them:
io.containerd.deprecation/tracing-processor-config The `otlp` property ... will be removed in containerd v2.0.
io.containerd.deprecation/cri-registry-mirrors The `mirrors` property ... will be removed in containerd v2.1. Use `config_path` instead.
Note those removal versions. The 2.x daemons gave different ones for the same settings (below), so do not plan around the dates in old warnings.
Step 2: Prove the problem on your own node
This is the call that matters for Kubernetes 1.38. crictl runtime-config sends the CRI RuntimeConfig request the kubelet uses to learn the cgroup driver. On 1.7.36:
$ crictl runtime-config
level=fatal msg="get runtime config: call RuntimeConfig RPC: rpc error: code = Unimplemented
desc = unknown method RuntimeConfig for service runtime.v1.RuntimeService"
On 2.3.7 and 2.4.2, with the same file:
$ crictl runtime-config
cgroup driver: SYSTEMD
That Unimplemented is what the 1.38 kubelet will hit. Today it falls back to its own cgroupDriver setting, as KEP-4033 describes. In 1.38, if PR 136731 merges, it refuses to fall back unless you turn on the LegacyCgroupDriverFallback feature gate. If your crictl is too old to have runtime-config, crictl info shows the runtime's SystemdCgroup value but not the RPC result.
Step 3: Clean up the config while still on 1.7
Fix the deprecated settings on 1.7 first, as the containerd docs recommend. You then change one thing at a time.
Registry mirrors. Move them from config.toml into hosts.toml files under config_path, as described in the containerd registry hosts docs. This is the version that worked on 2.3.7 and 2.4.2 in my run:
# /etc/containerd/certs.d/docker.io/hosts.toml
server = "https://registry-1.docker.io"
[host."https://mirror.gcr.io"]
capabilities = ["pull", "resolve"]
And in a version 2 config.toml:
[plugins."io.containerd.grpc.v1.cri".registry]
config_path = "/etc/containerd/certs.d"
The reason to do this now, not later: with the old mirrors block, both 2.x versions logged Found 'Registry.Mirrors' in CRI config which is incompatible with transfer service ... Falling back to local image pull mode. The node still pulls images, but on an older code path. With config_path, that warning went away and a busybox pull worked. I did not check which host actually served it.
Tracing. Replace the [plugins."io.containerd.tracing.processor.v1.otlp"] block with the standard OTLP exporter environment variables on the containerd systemd unit:
# systemctl edit containerd
[Service]
Environment=OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
Environment=OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
This one is the quiet failure in my test. On 1.7.36 the tracing plugins loaded from the TOML settings. On both 2.3.7 and 2.4.2, the same file produced skip loading plugin ... tracing endpoint not configured, logged at info level. So containerd tracing stops when you upgrade, even on 2.3.7, where the deprecation entry still says the setting is removed only in 2.4. On 2.4.2 the deprecation entry is gone too, so nothing warns you at all. With the two environment variables set, both 2.x versions loaded the tracing plugins again.
CNI bin_dir and enable_cdi. Leave them. containerd config migrate turned bin_dir = "/opt/cni/bin" into bin_dirs = ['/opt/cni/bin'] and dropped enable_cdi on 2.4.2, where CDI is always on. Neither caused a warning.
Step 4: Upgrade one node
The containerd steps below are what I ran. The drain and kubelet steps are standard Kubernetes practice (safely drain a node) that I did not run here.
NODE=worker-1
kubectl drain "$NODE" --ignore-daemonsets --delete-emptydir-data
# on the node
sudo systemctl stop kubelet containerd
V=2.3.7; ARCH=amd64 # arm64 on Graviton and Ampere
curl -fsSLO https://github.com/containerd/containerd/releases/download/v$V/containerd-$V-linux-$ARCH.tar.gz
curl -fsSLO https://github.com/containerd/containerd/releases/download/v$V/containerd-$V-linux-$ARCH.tar.gz.sha256sum
sha256sum -c containerd-$V-linux-$ARCH.tar.gz.sha256sum
sudo tar -C /usr/local -xzf containerd-$V-linux-$ARCH.tar.gz # leave config.toml alone
sudo systemctl start containerd
Use your distribution's packages instead if that is how the node was built. Two binaries from the 1.7 tarball are not in 2.x: containerd-shim and containerd-shim-runc-v1. If anything in your config still names io.containerd.runc.v1 or io.containerd.runtime.v1.linux, fix it first, because both were removed in 2.0. Also check your runc version: the 2.x tarball does not include runc.
Step 5: Verify before you uncordon
containerd --version
sudo crictl runtime-config # expect: cgroup driver: SYSTEMD
sudo crictl images | head # images pulled on 1.7 should still be here
sudo ctr deprecations list # what is left to fix
sudo journalctl -u containerd -b | grep -E 'level=(warning|error)'
In my run, the pause image pulled on 1.7.36 was still listed on 2.3.7 and then 2.4.2, from the same /var/lib/containerd. Every 2.x start with the old file logged Configuration migrated from version 2, use containerd config migrate to avoid migration. That warning is expected and harmless. Then start the kubelet and uncordon:
sudo systemctl start kubelet
kubectl uncordon "$NODE"
Make sure the kubelet unit starts after containerd (After=containerd.service and Wants=containerd.service). The 1.38 beta kubelet I ran yesterday exited at once when the containerd socket was missing.
Step 6: Migrate the file last
containerd config default prints version = 4 on both 2.3.7 and 2.4.2. Per the configuration version table, version 4 needs containerd 2.3.0 or later, and version 3 needs 2.0.0 or later. I also fed a version 3 file to 1.7.36, which refused to start: containerd config version 3 is not supported, the max version is 2. So the migrated file is a one-way door. Write it only when the whole node pool is on 2.3 or later and you will not roll back:
sudo containerd --config /etc/containerd/config.toml config migrate > /tmp/config-v4.toml
diff <(sudo cat /etc/containerd/config.toml) /tmp/config-v4.toml | less
sudo install -m 0644 /tmp/config-v4.toml /etc/containerd/config.toml && sudo systemctl restart containerd
One flag gotcha from my run: on 2.4.2, containerd config migrate -c old.toml worked. On 2.3.7 the same command failed with flag provided but not defined: -c. The form above, with --config before the subcommand, worked on both.
Interestingly, the migrated output still carried the old otlp block and the registry.mirrors table. Migration rewrites paths, not semantics, so it does not fix the two problems from Step 3.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
crictl runtime-config fails with Unimplemented ... RuntimeConfig |
Node is still on containerd 1.7 | Upgrade to 2.0 or later; 2.3 LTS recommended |
flag provided but not defined: -c from config migrate |
2.3.x does not accept -c after the subcommand |
containerd --config FILE config migrate |
containerd 1.7 will not start after a rollback: unsupported config version 3 |
The file was migrated before rolling back | Restore the version 2 file you kept |
| Traces from containerd stop after the upgrade | TOML otlp settings are ignored on 2.3.7 and 2.4.2 |
Set OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_PROTOCOL on the unit |
Falling back to local image pull mode warning |
Old registry.mirrors block in config.toml |
Move mirrors to hosts.toml under config_path |
Configuration migrated from version 2 on every start |
Old config version, harmless | Migrate the file once rollback is no longer needed |
failed check for fsverity support warning |
Filesystem without fs-verity (seen in my container) | Harmless for most nodes |
| Kubelet exits right after boot | Kubelet starts before containerd is up | Order the units: After=containerd.service |
FAQ
Can I upgrade straight from containerd 1.7 to 2.3?
Yes. The containerd release policy says upgrades between consecutive LTS releases are tested and supported, and gives 1.7 to 2.3 as its example. My run went from 1.7.36 straight to 2.3.7 on the same data directory.
Do I have to rewrite config.toml before upgrading?
No. containerd 2.x read my version 2 file and migrated it in memory at each start. Fix the deprecated settings first, and migrate the file itself only when you are sure you will not roll back.
Which containerd version should I use for Kubernetes 1.38?
The containerd support table recommends 2.3.0 or later, or 2.4.0 or later, for Kubernetes 1.37. 2.3 is LTS until April 2028, so it is the safer target for 1.38 too. Check the table again once 1.38 is released.
Will my images and containers survive the upgrade?
Images did in my test. The image pulled on 1.7.36 was listed by 2.3.7 and 2.4.2 from the same root directory. I did not test running containers; drain the node first so nothing is running during the switch.
What if I cannot upgrade before 1.38?
Turn on the LegacyCgroupDriverFallback kubelet feature gate, which the sneak peek describes as temporary, and keep cgroupDriver set in the kubelet config. Then upgrade containerd before the gate goes away.
Related: Kubernetes 1.38 sneak peek, Kubernetes 1.38 beta tested on kind, kubeadm cluster upgrade guide and the Kubernetes release and deprecation calendar.
Spot an error or something out of date? Email me and I will fix it and log it on the corrections page.
I'm Ajay Kumar — I build and operate PandaStack, an open-source Firecracker microVM cloud for AI agents, and write about the infrastructure and tooling around it.
Need this kind of infrastructure work? See what I do or email hello@ajayk.sh.
Related
How to Fix AWS ALB Unhealthy Targets and 502/503 Errors (2026)
Fix AWS Application Load Balancer unhealthy targets and 502, 503 and 504 errors step by step: read the health reason code, fix health check paths and success codes, security groups, ip vs instance targets, EKS readiness gates, deregistration delay, keep-alive timeouts and access logs.
13 minOct 31, 2026How to Upgrade an EKS Cluster to 1.37 Safely: Step by Step (2026)
Upgrade Amazon EKS one minor version at a time without an outage: refresh upgrade insights, scan for removed APIs with Pluto, upgrade the control plane with eksctl or the AWS CLI, then VPC CNI, CoreDNS and kube-proxy, then node groups and Karpenter, with the 7-day rollback.
15 minNov 27, 2026How to Move Envoy Gateway to ELB for Envoy: Pre-flight Checks (Tested)
ELB for Envoy went GA on 25 November 2026 and rejects several Envoy Gateway defaults. A read-only pre-flight script tested on kind with Envoy Gateway 1.10, the fixes for file access logs and global rate limits, the side-by-side migration steps, and the failures I hit.
12 min