1. Your GKE cluster uses Workload Identity for pod authentication to Google Cloud services. A pod in a Deployment is failing to authenticate to Cloud Storage, even though the service account has the necessary Storage permissions. You have verified that Workload Identity is enabled on the cluster. What should you check first?
- A. Verify that the pod's Kubernetes service account is annotated with the Google service account mapping (iam.gke.io/gcp-service-account)✓ Correct
- B. Check that the Kubernetes service account exists in the 'default' namespace
- C. Ensure the pod is using the correct image with GOOGLE_APPLICATION_CREDENTIALS set
- D. Confirm that the Google service account has the serviceAccountTokenCreator role on the cluster
Explanation
The correct answer is to verify that the pod's Kubernetes service account is annotated with the Google service account mapping (iam.gke.io/gcp-service-account). This annotation is required for Workload Identity to function; without it, the pod cannot assume the Google service account. Option 1 is wrong because the namespace where the Kubernetes service account exists is relevant, but the annotation is the primary requirement. Option 2 is wrong because GOOGLE_APPLICATION_CREDENTIALS is used for other authentication methods (JSON key files); Workload Identity doesn't require this environment variable. Option 3 is wrong because the cluster itself doesn't need a specific role; the Google service account and Kubernetes service account must be bound via workload identity binding (gcp-iam-binding).