From MicroK8s version: 1.20+
Supported arch: amd64, arm64
Portainer allows you to “build, manage and deploy containers in your Kubernetes environment quickly and easily. No more CLI, no more YAML, no more Kubernetes manifests. Just simple, fast, K8s configuration in a graphical UI, built on a trusted open source platform.”
To enable the addon:
microk8s enable portainer
You will now find the Portainer exposed as a Nodeport http service on port 30777 and as an https service on port 30779. To access it remember to use the IP address or FQDN of the node MicroK8s is running on. Use localhost if you are deploying Portainer on your local workstation.
When first navigating to the URLs above, you will be asked to create a user:
Confirm the username and an 8+ character password to continue to the dashboard. This will initially open on the settings page:
For details of the settings and usage of portainer, see the official documentation
The addon can be disabled at any time with the command:
microk8s disable portainer
$ microk8s enable portainer
Nothing to do for portainer
Where is the plugin on fresh system?
Sorry portainer isn’t working for you. Some things to check:
- is MicroK8s the latest version (
snap info microk8s -> v1.20.0 (1864) 219MB classic
- are you running on something other than amd64?
- are you set to the 1.20 track?
sudo snap refresh microk8s --channel=1.20
The URL could be 127.0.0.1:30777 with v1.20/stable on Ubuntu Server 20.04.
microk8s.kubectl get all -n portainer
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/portainer NodePort 10.152.183.229 <none> 9000:30777/TCP,30776:30776/TCP 26m
When you visit the portainer URL, do you get a list of API interfaces, or a UI?
I’ve yet to work out how to land on the UI.
I get an UI when I visit
pl visit https://documentation.portainer.io/ to know about the features & how to deploy stack
Hi pl change the node port to 30777 in documentation,9000 is container port
N00b advice needed:
The microK8S instance sits behind a firewall that has only 443 and 22 open, so I can’t access Port 30777 or 9000. My understanding is, I could remedy that with an ingress definition pointing to the Portainer service. How would I design that ingress? I’m especially confused about what path to pick.
My first draft:
- host: my.web.site
- pathType: Prefix
Deploy this to the default namespace? There are more services that use ingress.
Help is very much appreciated
The ingress must be on the same namespace as the portainer
Try first with the root context
/ in the path.
@balchua1 Thx for chipping in. So you would suggest:
- pathType: Prefix
Clashes with the landing page, but I shall try.
Sorry i misunderstood your issue.
As i normally do is to setup a domain name like
portainer.local, and configure ingress to route using the host rather than path. I find this easier rather than play with the path prefix.
I am using this addon on Windows 10 using Hyper-V in which case the default URL listed for portainer is not the valid one for me as microk8s is not on localhost but on the VM inside my Hyper-V. In this case I need to run the portainer using Node’s IP address rather than localhost:
Thanks for enabling portainer through microk8s!
I had a question on upgrading, I’m getting a notice in the bottom right of portainer that there is a new version available. Is there any way to upgrade portainer when installed through microk8s?
I would be glad to add this to the docs if someone could point me to any resources.
I haven’t tried this yet, but I imagine it can be upgraded per the instructions on the portainer site?
microk8s kubectl apply -n portainer -f https://raw.githubusercontent.com/portainer/k8s/master/deploy/manifests/portainer/portainer.yaml