exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 230 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 230
Topic #: 1
[All Professional Cloud Developer Questions]

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?

  • A. Create a Kubernetes Secret, and pass the Secret as an environment variable to the container.
  • B. Enable Application-layer Secret Encryption on the cluster using a Cloud Key Management Service (KMS) key.
  • C. Store the credential in Cloud KMS. Create a Google service account (GSA) to read the credential from Cloud KMS. Export the GSA as a .json file, and pass the .json file to the container as a volume which can read the credential from Cloud KMS.
  • D. Store the credential in Secret Manager. Create a Google service account (GSA) to read the credential from Secret Manager. Create a Kubernetes service account (KSA) to run the container. Use Workload Identity to configure your KSA to act as a GSA.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
hongminhcbg
1 week, 1 day ago
Selected Answer: A
simple is the best
upvoted 1 times
...
examprof
4 months, 3 weeks ago
Alternative D is correct. Problem I see with alternative A is that storing secrets in Kubernetes Secrets in plain text format is not aligned with best practices, as such secrets are base64 encoded but not encrypted at rest. If a malicious agent gains access to the cluster, secrets can be easily decodes and captured.
upvoted 1 times
...
__rajan__
7 months, 1 week ago
Selected Answer: D
D is correct.
upvoted 1 times
...
purushi
8 months, 3 weeks ago
Selected Answer: A
What I have seen till now and done till now is option A. So I go with option A. What is the best secure approach between A and D, I am not sure. So, very doubtfully I go with A.
upvoted 1 times
...
Pime13
1 year, 2 months ago
Selected Answer: D
https://kubernetes.io/docs/concepts/configuration/secret/
upvoted 2 times
...
mrvergara
1 year, 2 months ago
Selected Answer: D
A is not correct because a Kubernetes Secret only encodes the string, and anyone who can read the secret will be able to decode it.
upvoted 4 times
...
rich_maverick
1 year, 2 months ago
D is best answer: You should not store secrets in k8s secrets: https://kubernetes.io/docs/concepts/configuration/secret/ They are for environment variables.
upvoted 2 times
...
mrvergara
1 year, 2 months ago
Selected Answer: A
Using D would also be a secure approach. Option D uses a combination of Google Secret Manager, Google Service Account, and Workload Identity to store and retrieve secrets securely. The Workload Identity enables the Kubernetes Service Account to act as the Google Service Account, which has the required permissions to read the secrets from Secret Manager. Both options A and D are secure ways to store and retrieve secrets in a Kubernetes cluster, but option A is simpler and requires fewer steps. It may be more appropriate for smaller or less complex environments, while option D provides more advanced security and management features and is more suitable for larger and more complex environments.
upvoted 2 times
mrvergara
1 year, 2 months ago
It is the D option https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity https://cloud.google.com/secret-manager/docs/overview
upvoted 1 times
mrvergara
1 year, 2 months ago
A is not correct because a Kubernetes Secret only encodes the string, and anyone who can read the secret will be able to decode it.
upvoted 1 times
...
...
...
TNT87
1 year, 2 months ago
Selected Answer: A
Secrets can be mounted as data volumes or exposed as environment variables to be used by a container in a Pod. Secrets can also be used by ... https://cloud.google.com/secret-manager/docs/best-practices https://kubernetes.io/docs/concepts/security/secrets-good-practices/
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago