A GKE pod gets `403 ... does not have storage.objects.get access`, and the logs show it is using the node's Compute Engine default service account
IntermediateTroubleshootingCloud identity: IRSA, Workload Identity and CI OIDC
Answer
Likely causes → Workload Identity is not enabled on the node pool (metadata mode is not GKE_METADATA), or the KSA is not mapped to an IAM identity.
Diagnose →
gcloud container node-pools describe default --cluster prod --region asia-south1 \
--format='value(config.workloadMetadataConfig.mode)'
kubectl run t --rm -it --image=google/cloud-sdk:slim --overrides='{"spec":{"serviceAccountName":"api"}}' -n prod \
-- curl -s -H 'Metadata-Flavor: Google' http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/email
Fix → Update the node pool with --workload-metadata=GKE_METADATA, then grant the permission either to the KSA principal directly (principal://iam.googleapis.com/projects/<num>/locations/global/workloadIdentityPools/<proj>.svc.id.goog/subject/ns/prod/sa/api) or to a GSA that the KSA impersonates.
Prevent → Create clusters with Workload Identity on, and remove broad roles from the default compute SA.
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