DEV Community

Cover image for [Solved] The connection to the server 127.0.0.1:16443 was refused - did you specify the right host or port? (Ubuntu)
Shahriyar Al Mustakim Mitul
Shahriyar Al Mustakim Mitul

Posted on • Updated on

[Solved] The connection to the server 127.0.0.1:16443 was refused - did you specify the right host or port? (Ubuntu)

You might see this kind of issue:
Image description

So, for Microk8s, you need to check if that is running or not
Image description

You can inspect microk8s:
Image description

To solve these issues:

Simply uninstall microk8s:

snap disable microk8s
Enter fullscreen mode Exit fullscreen mode

or,

microk8s.disable dashboard dns
sudo snap remove microk8s
Enter fullscreen mode Exit fullscreen mode

Then install microk8s again on your ubuntu

sudo snap install microk8s --classic

microk8s status --wait-ready

microk8s enable dashboard dns registry istio

microk8s kubectl get all --all-namespaces

microk8s dashboard-proxy

Enter fullscreen mode Exit fullscreen mode

Start and stop Kubernetes to save battery
Start
microk8s start

Stop

microk8s stop

Now you can create pods
Image description

Top comments (0)