Containerd Update to 2.1 - Deprecation Warning
published at 2025-05-25, by José Luis Salvador Rufo.
By default, SimpleK8s does not upgrade third-party files automatically.
Containerd v2.1 introduced a deprecation warning related to the configuration of CNI plugins. Specifically, the bin_dir property within the [plugins."io.containerd.cri.v1.runtime".cni] section is deprecated. It has been replaced with the bin_dirs property, which expects an array of values.
DEPRECATION: The
bin_dir property of [plugins."io.containerd.cri.v1.runtime".cni] is deprecated since containerd v2.1 and will be removed in containerd v2.2.Example Configuration (Valid for Containerd 2.1):
...
[plugins]
...
[plugins.'io.containerd.cri.v1.runtime']
...
[plugins.'io.containerd.cri.v1.runtime'.cni]
bin_dirs = ['/opt/cni/bin']
...
...
...
...
Resolution:
Follow these steps to properly upgrade Containerd:
- Stop the Containerd service:
systemctl stop containerd - Restore Containerd binary from factory:
cp /usr/share/factory/usr/local/bin/containerd /usr/local/bin/containerd - Delete the deprecated configuration file:
rm /etc/containerd/config.toml - Restart the Containerd service. The configuration file
(
/etc/containerd/config.toml) will be recreated automatically.systemctl start containerd