Google Cloud Professional Cloud Developer — Question 327

You are deploying a microservices application to GKE. One microservice needs to download files from a Cloud Storage bucket. You have an IAM service account with the Storage Object Viewer role on the project with the bucket. You need to configure your application to access the Cloud Storage bucket while following Google-recommended practices. What should you do?

Answer options

Correct answer: D

Explanation

The correct answer is D because it uses a Kubernetes service account with IAM policy binding, which aligns with Google’s best practices for managing access to resources. Option A does not involve a Kubernetes service account, and options B and C involve managing IAM service account keys, which is not recommended due to security concerns.