2

I have a mickrok8s install from snap that after a power off doesn't start without internet access. Need a solution for not depending on the internet accessibility for my local cluster to work.

Trying to get the status will generate a bunch of: The connection to the server 127.0.0.1:16443 was refused - did you specify the right host or port?

Any idea what I can do?

1 Answers1

1

There has been some discussion on the microk8s github about this issue here : https://github.com/ubuntu/microk8s/issues/1653

Maybe it helps as a solution was proposed there which worked for the issue reporter:

It's working now and I will list out what I did for the benefit of others.

Assuming 192.168.210.32 is your master node IP address.

  1. Run sudo ip route add default via 192.168.210.32 for ALL VM nodes (Worker nodes too otherwise pulling image from local docker registry wouldn't work).
  2. Disable and enable dns in microk8s
  3. Run sudo snap restart microk8s
  4. Remove worker-nodes from cluster and add them back. You should now see Join node with: microk8s 192.168.210.32:25000/JSKjpIGPOcVsJWKrKeoNOGbKdvvYiCiF, notice the IP is now your master node IP (it was the router IP if you have internet connection I think?).
  5. For me, I encountered ImagePullBackErr in the VMs that hasn't assign a hostname to 192.168.210.32. The pull error was fixed once I assigned 192.168.210.32 with the same hostname as the master node VM's. i.e. I append the line 192.168.210.32 master-node to /etc/hosts
Zanna
  • 72,312
Koen
  • 1,277