I run a kubernetes cluster, installed with kubeadm
. I recently upgraded from 1.19 to 1.20 and migrated the container runtime from docker
to containerd
, since docker
is now deprecated.
I configured containerd
and kubelet
to use it, and uninstalled docker
from all nodes. Everything seems to be running fine.
Today, I tried to upgrade from 1.20 to 1.21 but I got two warnings when running kubeadm upgrade plan
which make me think the containerd
transition was not complete:
It tries to use docker:
cannot automatically set CgroupDriver when starting the Kubelet: cannot execute 'docker info -f {{.CgroupDriver}}': executable file not found in $PATH
- I probably have a configuration issue because
kubeadm
seems to not be aware that we don't use docker anymore, but I haven't found the right option in the documentation or local conf, except--cri-socket
which doesn't work withkubeadm upgrade
. - Second, the wording is strange: "when starting the Kubelet". But my kubelet is starting just fine, doesn't complain about missing docker or CgroupDriver.
- I probably have a configuration issue because
It doesn't detect the cgroup driver setting:
The 'cgroupDriver' value in the KubeletConfiguration is empty. Starting from 1.22, 'kubeadm upgrade' will default an empty value to the 'systemd' cgroup driver. The cgroup driver between the container runtime and the kubelet must match!
This is really surprising because I have
cgroupDriver: systemd
inkubectl -n kube-system get cm kubelet-config-1.20 -o yaml
, in/var/lib/kubelet/config.yaml
, also the flag in/etc/default/kubelet
and/var/lib/kubelet/kubeadm-flags.env
, and it is even printed bykubeadm --v=10
!
How can I find out if there is an underlying configuration issue, or is I can safely ignore these warnings ?
I'm not sure what files, configmap or logs may be useful to help me solve this, but I will gladly provide them if needed.