How to access micro8ks's dashboard web UI?
Andrew Henderson
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-infoHow to get the URL of the dashboard of a microk8s installation running locally on Ubuntu 18.10?
23 Answers
I just use
microk8s dashboard-proxywhich results in
Checking if Dashboard is running.
Dashboard will be available at
Use the following token to login:
eyJhbGciOiJSUzI1NiIsImtpZCI6ImJVTm01V1dBSHJUQVNtenFrRHExRWFPakd4X090QzVYQkcxUmRvdkItaUUifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJkZWZhdWx0LXRva2VuLXprdmQ5Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6ImRlZmF1bHQiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiJhMDVlZmFkNS03MzE1LTRiYzctOTk4OC04ZDg5YzA0YmU0YjIiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6a3ViZS1zeXN0ZW06ZGVmYXVsdCJ9.Oqqkn5hQoaWqwE6puYgrcWKKVzEwO49JZYWntXEnx2hycIlyhfbWWLPoJmboRMh4Ox85eZsuPmd9BuHLC9MfbR62XlXaEQlE3Pc-G9J7nR-eekXJaN6xVQWrL-uKNG5mnoPAFpD0LskdHTrlX1BL3zLRoX2LGRlk2xozNjlOwDpnJmhHR8u7naWxb-YZBeRov757GJNu7n2N5iysba5tyf3X_NkNyTl9sjmiUGIo9o2xIujWPxmlpbqvUP5wcEEf9z6oIUjWP78WCZPl9RvpHU3o1lKe2WwC_PKZQga5qATuLJfv1L0hhOFOeuui70c2L0bUuozfMlEw77AIpALwGgIt works in Firefox without issues. For Google Chrome I had to enable the flag allow-insecure-localhost to allow local websites without correct security. This is done by opening chrome://flags/#allow-insecure-localhost and enabling the flag as shown:
You can get the IP with
kubectl -n kube-system get service/kubernetes-dashboard -o go-template={{.spec.clusterIP}}which shows the IP address which you need to access with https:// prefixed in your browser because there's no redirect from HTTP to HTTPS.
You can run
kubectl describe service/kubernetes-dashboard -n kube-systemand then you can go to the Endpoints specified . So in my case
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")
Thus I had to use Firefox where you will need to authenticate.
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 $tokenNow you can copy and paste the token and you should be able to access the dashboard.