0
votes

I installed Kubernetes in virtual BOX previously it was working properly but not it is showing The connection to the server 192.168.42.141:6443 was refused - did you specify the right host or port?, Please help.

1
can you ensure your vBox 192.168.42.141 is ok. is it changed? or kube-apiserver is running on your vBox?hoque
Have you tried restarting the minikube? Run: minikube stop, minikube delete, minikube start.Wytrzymały Wiktor
Is kube-apiserver running on your cluster?hariK
@harik how i can check api server is running or not.Dewa
@hoque yes i checked ip is not changed.plz let me know how i can check api service is running or bot.Dewa

1 Answers

1
votes

The connection to the server 192.168.42.141:6443 was refused - did you specify the right host or port?

According to issue there might be kube-apiserver not running state. To check the apiserver status run following command

$ docker ps
# If above is not sowing apiserver container, then it is stopped, To see the stopped container run
$ docker ps -a

P.S: From the comment there is also a version mismatch. To update kubectl follow this