Hello Team,
I have been the challenge below for a while now, this is the third time within the space of a month.
I set up a 3 node cluster (1 master and 2 worker nodes) using VMWare workstation running on a windows laptop.
I make use of Ubuntu Ubuntu 24.04 LTS in the VMs.
Whenever the laptop restarts, I am unable to get any output using kubectl command.
The cluster was setup using kubeadm and below is the error
temitayo@kubemaster:~$ kubectl get nodes
The connection to the server 192.168.142.133:6443 was refused - did you specify the right host or port?
temitayo@kubemaster:~$ kubectl version
Client Version: v1.29.5
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
The connection to the server 192.168.142.133:6443 was refused - did you specify the right host or port?
##update
I tried to check the status of the containers, see below update
temitayo@kubemaster:~$ sudo crictl ps -a
WARN[0000] runtime connect using default endpoints: [unix:///var/run/dockershim.sock unix:///run/containerd/containerd.sock unix:///run/crio/crio.sock unix:///var/run/cri-dockerd.sock]. As the default settings are now deprecated, you should set the endpoint instead.
ERRO[0000] validate service connection: validate CRI v1 runtime API for endpoint “unix:///var/run/dockershim.sock”: rpc error: code = Unavailable desc = connection error: desc = “transport: Error while dialing: dial unix /var/run/dockershim.sock: connect: no such file or directory”
WARN[0000] image connect using default endpoints: [unix:///var/run/dockershim.sock unix:///run/containerd/containerd.sock unix:///run/crio/crio.sock unix:///var/run/cri-dockerd.sock]. As the default settings are now deprecated, you should set the endpoint instead.
ERRO[0000] validate service connection: validate CRI v1 image API for endpoint “unix:///var/run/dockershim.sock”: rpc error: code = Unavailable desc = connection error: desc = “transport: Error while dialing: dial unix /var/run/dockershim.sock: connect: no such file or directory”
CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID POD
3791719ae6ac3 b36112597a5f1 38 seconds ago Exited kube-apiserver 16 a0e3497554cb0 kube-apiserver-kubemaster
0420695098f4f 3861cfcd7c04c About a minute ago Exited etcd 16 faebb8677fda7 etcd-kubemaster
32cda7c54511c 2242ad7f7c41a 40 minutes ago Running kube-controller-manager 1 16f2ba6d9c796 kube-controller-manager-kubemaster
b5abb201cf7f6 e579eb50f57be 40 minutes ago Running kube-scheduler 1 1faa66fcc7c29 kube-scheduler-kubemaster
a25b805a353f2 5e785d005ccc1 3 hours ago Exited calico-kube-controllers 0 d49965df5d25f calico-kube-controllers-658d97c59c-gpqxb
b249990050b33 cbb01a7bd410d 3 hours ago Exited coredns 0 b8967b4065e8d coredns-76f75df574-jcgbx
293a02821d315 cbb01a7bd410d 3 hours ago Exited coredns 0 1ad13e2a74d09 coredns-76f75df574-lqfxt
4e04fa810a647 08616d26b8e74 3 hours ago Exited calico-node 0 787a234538eeb calico-node-snl4w
b29fed9fc5a97 08616d26b8e74 3 hours ago Exited mount-bpffs 0 787a234538eeb calico-node-snl4w
5da07bc0301a9 d70a5947d57e5 3 hours ago Exited install-cni 0 787a234538eeb calico-node-snl4w
7a1eb5f77c082 d70a5947d57e5 3 hours ago Exited upgrade-ipam 0 787a234538eeb calico-node-snl4w
e5dea8e30dfb9 2019bbea5542a 3 hours ago Exited kube-proxy 0 596160f762f69 kube-proxy-5fnlf
bbb41fc2b55e4 e579eb50f57be 3 hours ago Exited kube-scheduler 0 e0887ab9ce774 kube-scheduler-kubemaster
1849902c901e8 2242ad7f7c41a 3 hours ago Exited kube-controller-manager 0 c1bdec4b03242 kube-controller-manager-kubemaster
I have tried every available option online but I cant seem to figure it out.
I’m just starting out with kubernetes and will appreciate your assistance.