Kubernetes dashboard error using service account token Kubernetes dashboard error using service account token kubernetes kubernetes

Kubernetes dashboard error using service account token



FIX: Create a Role Binding for the cluster role.

This should fix the problem:

kubectl delete clusterrole cluster-adminkubectl delete clusterrolebinding kubernetes-dashboard kubectl create clusterrolebinding kubernetes-dashboard --clusterrole=cluster-admin --serviceaccount=kube-system:kubernetes-dashboard

The above command will create a role binding that gives all permissions to all resources.


Run the Proxy:

kubectl proxy

Check the DashBoard: Please check the URL and port provided by kubectl

http://127.0.0.1:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/persistentvolume?namespace=default

More info: Cluster role:

  • You can check out the 'cluster-admin' role by:

    kubectl edit clusterrole cluster-admin

The problem here is that the serviceaccount 'kubernetes-dashboard' does not have 'list' permissions for the resource 'persistentVolumeClaims'.