← IAM423 / 640
hardgcloud

Grant workload identity access so a Kubernetes SA can impersonate a Google SA

command

gcloud iam service-accounts add-iam-policy-binding SA_EMAIL --role roles/iam.workloadIdentityUser --member MEMBER

also accepted

gcloud iam service-accounts add-iam-policy-binding

Command breakdown

Part of the Google Cloud CLI (gcloud) — IAM category.

gcloudiamservice-accountsadd-iam-policy-bindingSA_EMAIL--roleroles/iam.workloadIdentityUser--memberMEMBER
FlagPurpose
--roleBoolean flag
--memberBoolean flag

Test your recall — not just your reading.

Practice with interactive quiz →