namespaces is forbidden: User “system:serviceaccount:kube-system:kubernetes-dashboard” cannot list resource “namespaces” in API group “” at the cluster scope

Scenario

Probably, you are here because you have the same error in the screenshot above.

If so, this means you installed kubernetes dashboard and you are facing this issue.

This means, you are step ahead celebrating the k8s dashboard and show it to your Boss.

But this error lets you angry

Solution

If you installed the dashboard with Helm, you just need to add these values :

If you want to grant wider access, switch the “true” and “false“.

Without Helm

You are a poor man. How come you install apps on top of k8s without Helm ?

  • Install Helm
  • Install k8s dashboard with Helm

Content of values.yaml explained above.

Related:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abdennour Toumi

Abdennour Toumi

Software engineer, Cloud Architect, 5/5 AWS|GCP|PSM Certified, Owner of kubernetes.tn