Kubernetes Dashboard Token Issue Solved!

Jan Rock
1 min readNov 24, 2020

--

I believe this would be useful temporary solution for everyone who struggle to log into Kubernetes Dashboard. Everything installed, Dashboard up, but where is the token? For some reason you can not make it working? There is simple solution to skip the annoying token. Of course until you find the way to fix it.

If you want to disable the token login, use this command:

microk8s.kubectl edit deployment/kubernetes-dashboard --namespace=kube-system

Note: kube-system is for Microk8s, maybe your namespace will be different

Find this (line #40) and add line with enable-skip-login as below:

template:
metadata:
creationTimestamp: null
labels:
k8s-app: kubernetes-dashboard
spec:
containers:
- args:
- --auto-generate-certificates
- --namespace=kube-system
- --enable-skip-login

Save and exit (wq).

Final step is make sure the service is available from outside:

microk8s.kubectl proxy — address=’0.0.0.0' — accept-hosts=’^*$’

Reload dashboard and you should see this screen:

http://{your_IP_address}:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#/overview?namespace=_all

Press Skip! ;)

--

--