The AKS Identity Map
Five separate identity questions sit behind the phrase “AKS authentication.”
Learning status: Not practiced
The moving parts
Separate the paths first
“AKS auth” is not one credential. It describes several callers, targets, and authorization systems. Decide which caller is trying to reach which API before debugging a token.
| Caller → target | Identity or credential | Authorization layer |
|---|---|---|
| Human or automation → Kubernetes API | Microsoft Entra user, group, or service principal; typically through kubelogin | Kubernetes RBAC or Azure RBAC for Kubernetes |
| Operator → AKS resource in Azure | Microsoft Entra identity | Azure RBAC on the AKS resource or its parent scope |
| AKS control plane → Azure APIs | AKS control-plane managed identity | Azure RBAC on Azure resources |
| Node kubelet → Azure services | Kubelet managed identity | Azure RBAC, commonly AcrPull on a registry |
| Pod → Azure service | Kubernetes service-account token exchanged through Microsoft Entra Workload ID | Azure RBAC or the target service's own authorization |
The pod-to-Azure flow is the main subject of this library. It is not the same as signing in to kubectl, and a Kubernetes service-account token is not an Azure access token.
Workload identity in one pass
- A Kubernetes service account is assigned to a pod.
- The AKS OIDC issuer signs a short-lived projected service-account token for that account.
- The workload identity webhook mutates labeled pods, adding a token volume and environment variables.
- An Azure SDK reads the token file and asks Microsoft Entra ID to exchange it.
- A federated identity credential (FIC) checks the token's issuer, subject, and audience against the identity it trusts.
- The application receives an Entra access token for a requested scope.
- Azure RBAC or the target service authorizes that identity's requested operation.
Each step is a separate boundary. A valid FIC does not grant access to Key Vault; a role assignment does not fix a mismatched FIC subject.
A safe debugging order
Check the target API and caller first. Then inspect the pod's service account and workload-identity label, the injected file-path environment variable, the projected token audience, the FIC issuer and subject, SDK credential support, and finally the role assignment at the target resource scope.
For AKS Automatic, the OIDC issuer and Workload ID are preconfigured. For AKS Standard, enable them on the cluster before configuring the pod.
Primary sources
Connects to