I have setup the Kubernetes cluster with Kubespray
Once I restart the node and check the status of the node I am getting as below
$ kubectl get nodes
The connection to the server 127.0.0.1:6443 was refused - did you specify the right host or port?
Environment:
OS : CentOS 7
Kubespray
kubelet version: 1.22.3
Need your help on this.
Regards,
Zain
3
Answers
Thank you Sai for your inputs. i was getting
journalctl -xeu kubelet
output wasError while dialing dial unix /var/run/cri-dockerd.sock: connect: no such file or directory
i was restarted and enabled cri-dockerd servicesthen
sudo systemctl start kubelet
finally it works for me.#kubectl cluster-info
Kubernetes control plane is running at https://127.0.0.1:6443
this link will give https://github.com/kubernetes-sigs/kubespray/issues/8734 more info. Regards,Zain
Below step can solve your issue.
kubelet may be down, use the below commands on the master node.
Then try using
kubectl get nodes
.This work for me, I’m using minukube,
When checking the minikube status by running the command
minikube status
you’ll probably get something like thatTo fix it, I just followed the next steps:
minikube update-context
minukube start