You can configure containerd v2 as the primary container runtime either at the cluster level or for specific node groups. This runtime option enables the use of cgroups v2, provides improved security, and allows more flexible resource management.
To view the current container runtime type used by default in the cluster NodeGroups, use the following command:
d8 system edit cluster-configuration
The container runtime type is specified in the defaultCRI parameter.
Requirements
Migration to containerd v2 is possible under the following conditions:
- Nodes meet the requirements described in the cluster-wide parameters.
- The node kernel version is not in the range 6.12.0–6.12.28 or 6.14.0–6.14.6 (these versions are affected by CVE-2025-37999 in EROFS).
- There are no custom configurations on the server in
/etc/containerd/conf.d(example of a custom configuration).
On Ubuntu nodes in AWS, the erofs kernel module required by containerd v2 is shipped in a separate linux-modules-extra package. DP installs it automatically, but for some kernels, mostly outdated ones, the package is no longer published in the APT repository. In that case, the installation is skipped, a warning is written to the node logs, the node gets the node.deckhouse.io/containerd-v2-unsupported label, and the D8NodeContainerdV2NotSupported alert fires.
The problem has been confirmed for the 5.15.0-1028-aws, 6.8.0-1024-aws, and 6.8.0-1029-aws kernels. To migrate such nodes, switch the node group to a newer AMI or kernel that provides erofs.
Before migrating, check whether there are such nodes in the cluster: check the alerts and the list of labelled nodes (see the commands below).
If any of the requirements described in the general cluster parameters are not met, Deckhouse Platform adds the label node.deckhouse.io/containerd-v2-unsupported to the node. If the node has custom configurations in the /etc/containerd/conf.d/ (if CRI containerd v1 is used on the cluster nodes) or /etc/containerd/conf2.d/ (if CRI containerd v2 is used on the cluster nodes) directories, the label node.deckhouse.io/containerd-config=custom is added to it.
If one of these labels is present, changing the spec.cri.type parameter for the node group will be unavailable. Nodes that do not meet the migration conditions can be viewed using the following commands:
d8 k get node -l node.deckhouse.io/containerd-v2-unsupported
d8 k get node -l node.deckhouse.io/containerd-config=custom
Additionally, a administrator can verify if a specific node meets the requirements using the following commands:
uname -r | cut -d- -f1
stat -f -c %T /sys/fs/cgroup
systemctl --version | awk 'NR==1{print $2}'
modprobe -qn erofs && echo "TRUE" || echo "FALSE"
ls -l /etc/containerd/conf.d
How to enable containerd v2
During migration the directory /var/lib/containerd will be cleared, causing all pod images to be re-pulled, and the node will reboot.
Also note that this is a disruptive update. If spec.disruptions.approvalMode: Manual is set for a node group, approve the update on the respective nodes with the annotation: d8 k annotate node <NODE-NAME> update.node.deckhouse.io/disruption-approved=.
You can enable containerd v2 in two ways:
-
For the entire cluster. Set the value
ContainerdV2for thedefaultCRIparameter in theClusterConfigurationresource. This value will apply to all NodeGroup objects wherespec.cri.typeis not explicitly defined.Example:
apiVersion: deckhouse.io/v1 kind: ClusterConfiguration ... defaultCRI: ContainerdV2 -
For a specific node group. Set
ContainerdV2in thespec.cri.typeparameter of the NodeGroup object.Example:
apiVersion: deckhouse.io/v1 kind: NodeGroup metadata: name: worker spec: cri: type: ContainerdV2When migrating to containerd v2 Deckhouse Platform will begin sequentially updating the nodes.