After recreating an AKS cluster, pods fail with `AADSTS700211: No matching federated identity record found for presented assertion issuer`
AdvancedTroubleshootingCloud identity: IRSA, Workload Identity and CI OIDC
Answer
Likely causes → Every AKS cluster has its own OIDC issuer URL. The federated identity credentials on the managed identity still point at the old cluster's issuer.
Diagnose →
az aks show -g rg -n prod --query oidcIssuerProfile.issuerUrl -o tsv
az identity federated-credential list -g rg --identity-name api-id -o table
Fix →
az identity federated-credential create -g rg --identity-name api-id --name prod-api \
--issuer "$(az aks show -g rg -n prod --query oidcIssuerProfile.issuerUrl -o tsv)" \
--subject system:serviceaccount:prod:api --audiences api://AzureADTokenExchange
Prevent → Make federated credentials depend on the cluster's issuer output in Terraform, so a rebuild updates them. For blue/green clusters, add a credential for each.
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