An AKS app using `DefaultAzureCredential` fails with `ManagedIdentityCredential authentication unavailable` / `WorkloadIdentityCredential authentication unavailable`
BeginnerTroubleshootingCloud identity: IRSA, Workload Identity and CI OIDC
Answer
Likely causes → The pod is missing the label azure.workload.identity/use: "true", so the webhook never injected AZURE_CLIENT_ID, AZURE_TENANT_ID and AZURE_FEDERATED_TOKEN_FILE. The SA may also lack the azure.workload.identity/client-id annotation.
Diagnose →
kubectl get pod <pod> -o jsonpath='{.metadata.labels}'
kubectl exec <pod> -- env | grep AZURE_
Fix → Add the label to the pod template (not just the Deployment), annotate the SA with the identity's client ID, and restart the pods.
Prevent → Validate both with a Kyverno policy for namespaces that use workload identity.
More on Cloud identity: IRSA, Workload Identity and CI OIDC
A pod configured for IRSA runs `aws sts get-caller-identity` and gets the node role (`eks-node-group-role`) instead of its own roleBeginner`An error occurred (AccessDenied) when calling the AssumeRoleWithWebIdentity operation: Not authorized to perform sts:AssumeRoleWithWebIdentity` from an IRSA podIntermediate`InvalidIdentityToken: No OpenIDConnect provider found in your account for https://oidc.eks.ap-south-1.amazonaws.com/id/ABC123`BeginnerIRSA env vars are present in the pod, but one legacy service still uses the node roleIntermediatePods without IRSA can still call AWS with the node's permissions through `169.254.169.254`IntermediateWith EKS Pod Identity, the pod gets `Unable to locate credentials` even though a pod identity association existsIntermediate