6

There's information how to enable the dashboard extension

microk8s.enable dashboard

(which I ran) and how to display URLs of other extensions enabled like this:

kubectl cluster-info

How to get the URL of the dashboard of a microk8s installation running locally on Ubuntu 18.10?

  • Follow-up question: stackoverflow.com/questions/46664104/… – Karl Richter Jun 10 '19 at 22:36
  • this is how I accessed the dashboard from outside the cluster network. I hope you find it helpful! https://<Eth0 IP of Master>:<port from cluster-info>/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#/login – Xevious202 Apr 22 at 16:52
3

The information is well hidden in microk8s.kubectl get all --all-namespaces, maybe elsewhere. Since kubectl not well documented and not intuitive at all, I recommend

microk8s.kubectl get all --all-namespaces | grep service/kubernetes-dashboard

which reveals an IP address which you need to access with https:// prefixed in your browser because there's no redirect from HTTP to HTTPS.

| improve this answer | |
  • A comment from here, explains why the dashboard isn't visible when using kubectl cluster-info: "to have the dashboard (or any other service) appear in the cluster-info list you need to add the kubernetes.io/cluster-service=true label to its service. Upstream dashboard is not applying this label nor do we" – Nico du Toit Jun 17 '19 at 12:52
1

You can run

kubectl describe service/kubernetes-dashboard -n kube-system

and then you can go to the Endpoints specified https://<ip>:<port>. So in my case https://10.1.43.61:8443

Name:              kubernetes-dashboard
Namespace:         kube-system
Labels:            k8s-app=kubernetes-dashboard
Annotations:       Selector:  k8s-app=kubernetes-dashboard
Type:              ClusterIP
IP:                10.152.183.28
Port:              <unset>  443/TCP
TargetPort:        8443/TCP
Endpoints:         10.1.43.61:8443
Session Affinity:  None
Events:            <none>

But Chromium didn't let me enter the site (not even under "advanced") chromium

Thus I had to use Firefox where you will need to authenticate. firefox auth

You can authenticate with a token. To get the token run (dcoumentation):

token=$(microk8s kubectl -n kube-system get secret | grep default-token | cut -d " " -f1)

microk8s kubectl -n kube-system describe secret $token

Now you can copy and paste the token and you should be able to access the dashboard.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.