A cloud engineer is managing a stateless application on a Google Kubernetes Engine (GKE) cluster. The application needs to read data from a Google Cloud Storage bucket securely. To adhere to Google Cloud security best practices, the application must authenticate without using long-lived service account key files stored inside Kubernetes secrets or container images. Which approach should the engineer implement?
- Configure GKE Workload Identity by binding the Kubernetes ServiceAccount used by the pod to a Google Cloud IAM Service Account assigned the required Storage role.Cevap
- BCreate a service account JSON key in the Cloud Console, store it as a Kubernetes Secret, and mount it as a volume into the application pod.
- CMigrate the application deployment to a GKE Autopilot cluster so that Google Cloud automatically manages object-level Storage permissions for all pods.
- DEnable the GKE Cluster Autoscaler on the node pool to dynamically attach IAM service account credentials whenever new nodes are provisioned.
Cevap
Configure GKE Workload Identity by binding the Kubernetes ServiceAccount used by the pod to a Google Cloud IAM Service Account assigned the required Storage role.
The correct approach is to configure GKE Workload Identity. Workload Identity binds a Kubernetes ServiceAccount to a Google Cloud IAM Service Account, enabling application pods to securely authenticate to Google Cloud services like Cloud Storage using short-lived tokens without storing long-lived service account keys.
Adım Adım Çözüm
Anahtar Kavram
GKE Workload Identity Authentication
Tahmini Süre:1m 30s