Upgraded master node to 1.24.2 but now cannot connect

Asking for help? Comment out what you need so we can get more information to help you!

Cluster information:

Kubernetes version: 1.24.2
Cloud being used: (put bare-metal if not on a public cloud) baremetal
Installation method: kubeadm
Host OS: ubuntu 20.04
CNI and version: weave
CRI and version: docker

I upgraded my kubernetes on my master control node to 1.24.2 but now kubectl will not connect.

kubectl cluster-info shows

To further debug and diagnose cluster problems, use ‘kubectl cluster-info dump’.
The connection to the server localhost:8080 was refused - did you specify the right host or port?

root@kubemaster:~# kubectl version -o json
{
“clientVersion”: {
“major”: “1”,
“minor”: “24”,
“gitVersion”: “v1.24.2”,
“gitCommit”: “f66044f4361b9f1f96f0053dd46cb7dce5e990a8”,
“gitTreeState”: “clean”,
“buildDate”: “2022-06-15T14:22:29Z”,
“goVersion”: “go1.18.3”,
“compiler”: “gc”,
“platform”: “linux/amd64”
},
“kustomizeVersion”: “v4.5.4”
}
The connection to the server localhost:8080 was refused - did you specify the right host or port?

also docker ps | grep kube-apiserver does not look like its running

Hello,

I had the same issue and it was kubelet upgraded to 1.24.1 that was not starting. (stuck in activating status and keeps restarting)
A workarround that worked for me is to to downgrade kubelet to 1.23.8.

Regards,

1.24 dropped support for dockershim, if you want to continue to use docker, you need to use GitHub - Mirantis/cri-dockerd or switch to another container runtime. More info here: https://kubernetes.io/blog/2022/02/17/dockershim-faq/