Kubernetes Dashboard - Unknown server error after login

Alright, this seems to be a bug which is issued in Kubespray Github repo issue #5347


If your are using certificate to connect you certificate should be in the system:masters group So include the "Subject: O=system:masters, CN="

You can also create a Token and then use the token instead of the certificate:

There might be a possibility that your cluster role is bound to "Service Account" but not your group, You should check your group in the yaml file.Your service account has an access token, use that to authenticate instead of your certificate.

Use this to create a token and use it.

kubectl describe secret $(kubectl get secret | grep cluster-admin | awk '{print $1}')

token:

Update kubeconfig to authenticate yourself using that token, instead of the certificate you are currently using, and you should be successfully authenticated as that cluster-admin service account.

Kubernetes RBAC - forbidden attempt to grant extra privileges