Workload Identity Webhook
The AKS admission webhook mutates opted-in pods to add the projected token volume and Azure identity environment variables.
Learning status: Not practiced
The moving parts
The workload identity mutating admission webhook runs when a pod is admitted. It reads the pod's service account and opt-in label, then injects the projected token volume and Azure environment variables into the pod specification.
The required pod-template label is:
azure.workload.identity/use: "true"
Without the label, the pod is not opted in for mutation. The webhook injects AZURE_FEDERATED_TOKEN_FILE, AZURE_CLIENT_ID, and AZURE_TENANT_ID, along with the projected token mount. The SDK reads these values; normally the application does not open or manage the JWT itself.
Inspect the admitted pod rather than only the Deployment template:
kubectl get pod <pod> -n <namespace> -o yaml
After changing service-account annotations, recreate or restart pods to trigger a fresh admission decision.
Connects to