Wednesday, March 6, 2019

Namespaces is forbidden : AKS dashboard error


In Kubernetes dashboard if you get the mentioned error, that means the correct permissions were not granted to for the dashboard. Once you load the dashboard you will see notifications as mentioned below.
namespaces is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list namespaces at the cluster scope



Solution

You can run the below mentioned command on the Azure CLI and create the cluster role binding. Once you run this command the cluster admin permission will be grant to the AKS dashboard.

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

Hope this will help.
If you still experiencing with an issue you can write to me to get help on that.




No comments: