all i can assume is that the portainer service account did not get created for some reason (it should, as part of the deployment)… do a microk8s kubectl get serviceaccounts -n portainer and make sure the account was created by the install script…
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 220.127.116.11 microk8s-01 18.104.22.168 microk8s-02 22.214.171.124 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.
Hi @neilatportainer.io I have completely removed microk8s and then rebooted my PC and then installed microk8s classic channel 1.24 as you demonstrated. I have followed exactly the same steps you laid out and I am still getting the same issue. Any ideas? Any help would be appreciated.
@neilatportainer.io I don’t understand? I have spun up a single node swarm with microk8s. Are you saying to start up portainer on another pc and then connect to the portainer agent from there? Not quite sure what is being asked? Thank you.