A cloud engineer needs to configure a Google Kubernetes Engine (GKE) workload to securely access Google Cloud Storage using Workload Identity. Arrange the administrative and deployment steps in the correct sequential order from start to finish.
- 1Create a Google Service Account (GSA) and grant it the required IAM roles for Cloud Storage access.
- 2Create a Kubernetes Service Account (KSA) in the GKE namespace where the workload will be deployed.
- 3Grant the `roles/iam.workloadIdentityUser` IAM role on the GSA to the KSA member.
- 4Annotate the KSA with `iam.gke.io/gcp-service-account=GSA_EMAIL`.
- 5Apply the Deployment manifest configured with `spec.template.spec.serviceAccountName` set to the annotated KSA.
Cevap
The correct sequence begins with creating the Google Service Account (GSA) and assigning GCP IAM permissions, followed by creating the Kubernetes Service Account (KSA) in GKE. Next, grant the Workload Identity User IAM role to allow the KSA to impersonate the GSA. Then, annotate the KSA with the GSA email address. Finally, deploy the application manifest referencing the annotated KSA.
To configure Workload Identity correctly, you must first provision the Google Service Account (GSA) and grant it GCP IAM roles. Next, create the Kubernetes Service Account (KSA) in the cluster namespace. Then, grant the Workload Identity User role on the GSA to the KSA so GCP permits token impersonation. Fourth, annotate the KSA with the GSA's email address so GKE metadata server routes authentication requests properly. Finally, deploy the application manifest configured to use the annotated KSA.
Adım Adım Çözüm
Anahtar Kavram
Configuring Workload Identity for GKE workloads