An administrator needs to configure Workload Identity on a Google Kubernetes Engine (GKE) cluster to allow a pod to access Cloud Storage without downloading service account keys. Arrange the steps in the correct operational sequence from first to last to complete this configuration.
- 1Create a Google Service Account (GSA) in IAM and assign the required IAM permissions to it.
- 2Create a Kubernetes Service Account (KSA) inside the target GKE cluster namespace.
- 3Add the `roles/iam.workloadIdentityUser` IAM binding on the GSA to grant access to the KSA principal.
- 4Annotate the KSA with the email address of the created GSA (`iam.gke.io/gcp-service-account=GSA_EMAIL`).
- 5Deploy the application workload manifest configured with `spec.template.spec.serviceAccountName` set to the KSA name.
Cevap
The correct operational sequence is: 1) Create the Google Service Account (GSA) in IAM and grant required IAM roles. 2) Create the Kubernetes Service Account (KSA) in the GKE namespace. 3) Add the roles/iam.workloadIdentityUser IAM binding on the GSA for the KSA principal. 4) Annotate the KSA with the GSA email address. 5) Deploy the application workload specifying the KSA in the pod specification.
To securely grant GKE workloads access to GCP services via Workload Identity without exportable keys, you must first establish the GCP IAM identity (GSA), create the cluster identity (KSA), bind the KSA to the GSA using the `roles/iam.workloadIdentityUser` IAM role, annotate the KSA with the GSA email, and finally deploy the workload referencing the KSA in its pod specification.
Adım Adım Çözüm
Anahtar Kavram
Configuring Workload Identity in Google Kubernetes Engine