Interview Prep/Azure/AKS and ACR Errors

Workload identity env vars (`AZURE_CLIENT_ID`, `AZURE_FEDERATED_TOKEN_FILE`) are missing in the pod.

IntermediateTroubleshootingAKS and ACR Errors
Answer

Likely causes → Pod lacks label azure.workload.identity/use: "true" (it's a pod label, not a SA annotation, on current versions), workload identity not enabled on the cluster, or the webhook isn't running.

Diagnose →

az aks show -g rg -n aks --query "{oidc:oidcIssuerProfile.enabled, wi:securityProfile.workloadIdentity.enabled}"
kubectl get pod <pod> -n shop --show-labels
kubectl -n kube-system get pods | grep azure-wi-webhook

Fix → Add the label to the pod template, enable the feature (az aks update --enable-oidc-issuer --enable-workload-identity), restart pods.

Prevent → Template the label into base Helm charts.

Azure All Azure questions Roadmap: AKS & Azure DevOps

More on AKS and ACR Errors