Interview Prep/DevSecOps/Cloud identity: IRSA, Workload Identity and CI OIDC

With EKS Pod Identity, the pod gets `Unable to locate credentials` even though a pod identity association exists

IntermediateTroubleshootingCloud identity: IRSA, Workload Identity and CI OIDC
Answer

Likely causes → The eks-pod-identity-agent add-on is not installed or not running on that node, the pod predates the association, or the role trust policy is written for IRSA instead of Pod Identity.

Diagnose →

aws eks list-pod-identity-associations --cluster-name prod --namespace prod
kubectl get ds -n kube-system eks-pod-identity-agent
kubectl exec deploy/api -- env | grep AWS_CONTAINER_CREDENTIALS_FULL_URI

Fix → Install the add-on and restart the pod. The trust policy must be:

{ "Effect": "Allow",
  "Principal": { "Service": "pods.eks.amazonaws.com" },
  "Action": ["sts:AssumeRole", "sts:TagSession"] }

Prevent → Pick one mechanism per cluster (Pod Identity for new EKS clusters) and manage associations in Terraform.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Cloud identity: IRSA, Workload Identity and CI OIDC