Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

microk8s Connection to port 16443 was refused

I'm getting following error message:

root@master-1:~# microk8s.kubectl get no
The connection to the server 127.0.0.1:16443 was refused - did you specify the right host or port?

Even microk8s.kubectl cluster-info dump fails with message above. When I run microk8s start it still the same.

like image 553
hejkerooo Avatar asked Oct 03 '20 11:10

hejkerooo


Video Answer


1 Answers

It is hard to tell exactly what might went wrong here but there are few things that you could do in order to fix your issue:

  • .kube/config is missing or not configured correctly. Create or copy a valid kubeconfig file to solve this.

  • You have swap not turned off. With swap enabled, kubelet service will not start. Execute: sudo swapoff -a in order to make sure it is disabled.

  • kubelet might be down. Check kubelet logs and make sure that kube-apiserver is up and running.

  • Check which ports are appropriate to use with the telnet command.

like image 149
Wytrzymały Wiktor Avatar answered Sep 23 '22 13:09

Wytrzymały Wiktor