D4: Service Accounts for GKE Applications
Google Cloud Associate Cloud Engineer exam practice questions · 10 flashcards
Question
Recommended way for GKE Pods to access Google APIs?
1 / 10
Tip: Space flips the card, ← / → navigate.
Show all 10 Service Accounts for GKE Applications practice questions and answers
- Recommended way for GKE Pods to access Google APIs?Workload Identity Federation for GKE.
- How do you enable it on a Standard cluster?--workload-pool=PROJECT_ID.svc.id.goog on the cluster and GKE_METADATA on node pools.
- Is it enabled on Autopilot?Yes, by default.
- How do you grant access directly to a Kubernetes SA?IAM binding to the KSA principal identifier in the workload identity pool.
- How do you link a KSA to an IAM service account?Grant roles/iam.workloadIdentityUser on the IAM SA to the KSA, and annotate the KSA with iam.gke.io/gcp-service-account.
- Why avoid storing SA keys in Kubernetes Secrets?Keys can leak and need rotation; Workload Identity uses short-lived tokens.
- Why avoid relying on the node service account for apps?All Pods on the node would share its permissions.
- Which component serves tokens to Pods?The GKE metadata server.
- How do you specify which KSA a Pod uses?serviceAccountName in the Pod spec.
- Benefit of per-workload identities?Least privilege and clear audit trails per application.