You’re stuck at this place:
Create a service account:
kubectl create serviceaccount cluster-admin-dashboard-sa
kubectl create clusterrolebinding cluster-admin-dashboard-sa \
--clusterrole=cluster-admin \
--serviceaccount=default:cluster-admin-dashboard-sa
Get the secret:
kubectl get secret | grep cluster-admin-dashboard-sa
Ex output:
cluster-admin-dashboard-sa-token-hhxv9 kubernetes.io/service-account-token 3 10m
Copy the token, including the 6 characters after -token (in the above example it’s “cluster-admin-dashboard-sa-token-hhxv9“)
Describe the secret to get the token:
kubectl describe secret cluster-admin-dashboard-sa-token-hhxv9
Example output:
Copy the entire token, in this example from “ey… ” to “…t7g”
Go to the login console:
Paste the token
You’re in.
# open git bash locally
ssh -L 8001:localhost:8001 user@kuberneteshost
# go to the dashboard, use localhost:8001
http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#/login
# select log in with token, and paste the secret token from above