Google Cloud Professional Cloud Developer — Question 249

Your application is running as a container in a Google Kubernetes Engine cluster. You need to add a secret to your application using a secure approach. What should you do?

Answer options

Correct answer: D

Explanation

Option D is correct because it utilizes Secret Manager, which is specifically designed for managing and accessing secrets securely, along with Workload Identity for seamless authentication. Option A does not provide the same level of security as it exposes the secret as an environment variable. Option B enables encryption but doesn't address secret management directly. Option C complicates the process unnecessarily by relying on Cloud KMS and requires additional steps to export and manage the service account credentials.