How to login kubernetes dashboard: K8s generate token

Connect to your kubernetes cluster.

 

kubectl -n kube-system get secret |grep kubernetes.io/service-account-token

#All secrets with type ‘kubernetes.io/service-account-token’ will allow to log in.

# Note that they have different privileges.

 

kubectl -n kube-system describe secrets aws-node-token-<WHATEVERSTRING>

 

You will get the token from the output. Use that for login