fINTERACTIVE FIELD GUIDES
Start here01 / 30

The AKS Identity Map

Five separate identity questions sit behind the phrase “AKS authentication.”

Learning status: Not practiced

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 → targetIdentity or credentialAuthorization layer
Human or automation → Kubernetes APIMicrosoft Entra user, group, or service principal; typically through kubeloginKubernetes RBAC or Azure RBAC for Kubernetes
Operator → AKS resource in AzureMicrosoft Entra identityAzure RBAC on the AKS resource or its parent scope
AKS control plane → Azure APIsAKS control-plane managed identityAzure RBAC on Azure resources
Node kubelet → Azure servicesKubelet managed identityAzure RBAC, commonly AcrPull on a registry
Pod → Azure serviceKubernetes service-account token exchanged through Microsoft Entra Workload IDAzure 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

  1. A Kubernetes service account is assigned to a pod.
  2. The AKS OIDC issuer signs a short-lived projected service-account token for that account.
  3. The workload identity webhook mutates labeled pods, adding a token volume and environment variables.
  4. An Azure SDK reads the token file and asks Microsoft Entra ID to exchange it.
  5. A federated identity credential (FIC) checks the token's issuer, subject, and audience against the identity it trusts.
  6. The application receives an Entra access token for a requested scope.
  7. 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