Least privilege for AKS means Azure RBAC roles at namespace scope, not Cluster Admin
Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.
AKS can authorize Kubernetes API calls with Azure RBAC. Microsoft's documentation, read 16 Nov 2026, lists four built-in roles, advises cluster or namespace scope, and warns that the Writer role can reach Secrets and run pods as any service account in the namespace.
Open the calculator ยท All services
AKS can authorize Kubernetes API calls with Azure RBAC role assignments
Microsoft's documentation says Microsoft Entra ID authorization for the Kubernetes API uses Azure RBAC role assignments to grant access to Kubernetes resources. For built-in Kubernetes resources, assign one of the AKS built-in roles at the cluster or namespace scope. For custom resources, assign a custom role with Azure ABAC conditions that name the CRD groups or kinds.
Microsoft also notes a split: with integrated Entra authentication, users and groups can be subjects in Kubernetes RBAC, but Entra role assignments and Kubernetes RBAC bindings are then managed separately. Choosing one model for Kubernetes API access avoids having two places to audit.
Azure RBAC for the Azure resource itself (the cluster in the portal and the Azure Resource Manager API) is a different layer from Kubernetes API authorization. A person can hold one without the other.
The identities that call this service (people, services, workloads, third parties) are covered in the Azure service identities guide and the workload identities guide.
Roles to avoid, with the documented reason
Three of the four built-in roles carry a documented caution.
- Azure Kubernetes Service RBAC Cluster Admin: Microsoft's description is super-user access to perform any action on any resource, with full control over every resource in the cluster and all namespaces.
- Azure Kubernetes Service RBAC Writer: it cannot view or modify roles or role bindings, but Microsoft says it allows accessing Secrets and running pods as any service account in the namespace, so it can gain the API access of any service account there.
- Azure Kubernetes Service RBAC Admin: intended to be granted within a namespace, it can create roles and role bindings in that namespace. Microsoft's description says it does not allow write access to resource quota or to the namespace itself.
- Azure Kubernetes Service RBAC Reader is the lowest of the four, and Microsoft says it cannot view Secrets because reading them would allow API access as any service account in the namespace.
A minimal binding for a team that reads one namespace
Microsoft's documentation shows the Reader and Writer role assignments scoped to a namespace by appending /namespaces/
| Need | Built-in role | Scope |
|---|---|---|
| Read most objects in one namespace | Azure Kubernetes Service RBAC Reader | $AKS_ID/namespaces/ |
| Deploy workloads in one namespace | Azure Kubernetes Service RBAC Writer | $AKS_ID/namespaces/ |
| Manage roles and bindings in one namespace | Azure Kubernetes Service RBAC Admin | $AKS_ID/namespaces/ |
| Any action anywhere in the cluster | Azure Kubernetes Service RBAC Cluster Admin | $AKS_ID (few people) |
Namespace scope, custom roles and ABAC conditions narrow the rest
Microsoft's article shows custom role definitions, for example an AKS Deployment Reader role created from a JSON file and assigned with az role assignment create. Use a custom role when the four built-in roles cover more verbs than the task needs.
A practical note from the documentation: after you create a namespace-scoped assignment, the portal does not show it at that scope. Find it with az role assignment list --scope $AKS_ID/namespaces/
Checking what is used
Run the list command above for every namespace and for the cluster, then compare it with who deploys, who debugs and who only reads. Microsoft Entra access reviews can recur weekly to annually for the groups that hold these roles.
Defender for Cloud permissions management, per Microsoft's documentation, flags excessive and unused permissions for identities including managed identities and service principals, which covers the identities that automation uses to reach the cluster.
Related pages
Sources
- Azure RBAC for Kubernetes authorization in AKS, read 16 Nov 2026
- Microsoft Entra access reviews, read 16 Nov 2026
- Defender for Cloud permissions management, read 16 Nov 2026
Last reviewed 16 Nov 2026.