<p>When I try to run <code>kubectl get namespaces</code> or <code>kubectl get nodes</code> commands etc. I am getting this error (I am using Azure Kubernetes Service). I would appreciate any help with this issue.</p>

<pre><code>Error from server (Forbidden): namespaces is forbidden: User "XXXXXXXXXXXXXX" cannot list namespaces at the cluster scope
</code></pre>

<p>This is an authorization module error message: as explained in the <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/" rel="nofollow noreferrer">Kubernetes docs</a> and, for example, <a href="https://speakerdeck.com/mhausenblas/kubernetes-security-from-image-hygiene-to-network-policies?slide=29" rel="nofollow noreferrer">shown here</a> you need to have the permissions to carry out a certain action (in this case: list namespaces and nodes).</p>

<p>Since you didn't share more background on how this cluster is set up or who is responsible for it, I can only suggest to either reach out to the cluster admin to give you the rights, or, if you've set up the cluster yourself, have a look at the <a href="https://learn.microsoft.com/en-us/azure/aks/aad-integration" rel="nofollow noreferrer">AD integration</a>, which may be of use here.</p>
