A CI pipeline creates a ServiceAccount for deploys but `kubectl get secret` shows no token secret for it on Kubernetes 1.29
BeginnerTroubleshootingCloud identity: IRSA, Workload Identity and CI OIDC
Answer
Likely causes → Since 1.24, Kubernetes no longer auto-creates long-lived kubernetes.io/service-account-token Secrets. Tokens are short-lived and come from the TokenRequest API.
Diagnose → kubectl get sa deployer -o yaml shows no secrets: entry.
Fix → Prefer a short-lived token:
kubectl create token deployer -n ci --duration=1h
If you truly need a long-lived one, create a Secret of type kubernetes.io/service-account-token with the annotation kubernetes.io/service-account.name: deployer.
Prevent → Better still, authenticate CI through cloud identity (EKS access entries, GKE IAM) or GitOps pull, so no Kubernetes token is stored in CI at all.
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