OK, setup a 3 node cluster…
Cannot replicate your issue.
Here are the steps i went through…
-
Deployed 3x brand new Ubuntu 22.04 VMs (2 CPU, 4 GB RAM)
-
Logged in as root on each
-
on each node, ran the command “snap install microk8s --classic --channel=1.24”
-
on each node, created host files for each other node. comment out the 127.0.0.1 entry for the hostname (eg mine is below):
#127.0.1.1 microk8s-01 microk8s-01
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
192.241.202.149 microk8s-01
192.241.204.72 microk8s-02
192.241.202.212 microk8s-03 -
on the first node, ran the command “microk8s add-node”
-
used the result to join the second node
-
ran the add node command again for 3rd node
-
waited a few minutes, then on the first node, I ran the command “microk8s status” to check all 3 nodes ok and cluster is in HA mode
-
on the first node, I ran the command “microk8s enable dns metrics-server rbac hostpath-storage”
-
waited a few minutes, then ran the command “microk8s enable community”
-
then ran the command “microk8s enable portainer”
-
ran the command “microk8s kubectl get service -n portainer” to check all is well, and my nodeport is published
-
opened the portainer UI, set the password, and clicked “get started”
-
navigate around… no access issues at all
Note though, without cluster-shared storage, Portainer could be rescheduled on another node, and your config would be lost… Portainer needs cluster-wide persistence, else you need to pin Portainer to just one node.
What did i do differently from your setup?