I have an aks cluster running kubernetes 1.21.2 with those options :
Kubernetes RBAC --> enable
AKS-managed AAD --> enable
Local accounts --> disabledWhen I run the az aks get-credentials --resource-group <resource-group> --name <cluster-name> --admin it fails as expected. So far it's looking good.
I still want someone to be admin, so I give a user following privileges :
Azure Kubernetes Service Cluster User Role
Azure Kubernetes Service RBAC Cluster AdminI followed the following steps to try out my user is a cluster admin :
az login and input my user's credentials to loginaz aks get-credentials --resource-group <resource-group> --name <cluster-name> to download the clusterUser_kubeconfig kubectl get pods -A to list pods in all namespacesTo sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code DKXXXXX8T to authenticate.kubectl get pods -A fails :
Error from server (Forbidden): pods is forbidden: User "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" cannot list resource "pods" in API group "" at the cluster scopeAccording to what I have read so far, it should be working as my user is Azure Kubernetes Service RBAC Cluster Admin. Could someone enlighten me what I've missed or misunderstood ?