Unable to determine runtime API version: rpc error

Kubernetes version: v1.18.19
Cloud being used: bare-metal
Installation method: kubeadm
Host OS: CentOS7
CNI and version: calico/cni:v3.17.0
CRI and version: docker 18.09.9

I upgrade my k8s cluster from v1.18.19 to v1.19.16 refer to this guide: Upgrading kubeadm clusters | Kubernetes

When I restart kubelet, the cluster turn down, and I find the message:

Error: failed to run Kubelet: unable to determine runtime API version: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix: missing address

It seems I should change the Container Runtime from docker to containerd?

And that I find containerd service is already running?

I’m using the latest kubelet version (v1.24.3) here is some step that I did to solve the problem:

  1. Install cri-dockerd (GitHub - Mirantis/cri-dockerd)
  2. Run “kubeadm init” with argument: --cri-socket=unix:///var/run/cri-dockerd.sock

It looks like you have changed your container runtime to cri-dockerd.

Run “kubeadm init” with argument: --cri-socket=unix:///var/run/cri-dockerd.sock

If you run kubeadm init, maybe I think the parameters will be reset except --cri-socket=unix:///var/run/cri-dockerd.sock?