Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation CKAD Exam - Topic 3 Question 69 Discussion

Actual exam question for Linux Foundation's CKAD exam
Question #: 69
Topic #: 3
[All CKAD Questions]

Refer to Exhibit.

Context

You are tasked to create a secret and consume the secret in a pod using environment variables as follow:

Task

* Create a secret named another-secret with a key/value pair; key1/value4

* Start an nginx pod named nginx-secret using container image nginx, and add an environment variable exposing the value of the secret key key 1, using COOL_VARIABLE as the name for the environment variable inside the pod

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

0/2000 characters
Amira
9 hours ago
This question is tricky!
upvoted 0 times
...
Dolores
5 days ago
I thought we were supposed to avoid using environment variables for secrets?
upvoted 0 times
...
Nobuko
24 days ago
Just make sure to use the right container image, nginx is perfect!
upvoted 0 times
...
Carlee
29 days ago
Wait, can you really expose secrets like that? Seems risky.
upvoted 0 times
...
Ethan
1 month ago
Totally agree, that's the right way to do it!
upvoted 0 times
...
Edmond
1 month ago
You need to create a secret named another-secret with key1/value4.
upvoted 0 times
...
Willie
1 month ago
Haha, I bet the exam writers had a good laugh coming up with "COOL_VARIABLE" as the environment variable name. Gotta love those creative touches!
upvoted 0 times
...
Elmer
2 months ago
Option C looks good, but I'm still a bit confused about the environment variable name. Shouldn't it be something more descriptive?
upvoted 0 times
...
Lucina
2 months ago
I agree, C is the way to go. Straight to the point and gets the job done.
upvoted 0 times
...
Laticia
2 months ago
The correct answer is C. That's the easiest way to create a secret and consume it in a pod.
upvoted 0 times
...
Kimbery
2 months ago
I definitely recall the steps for creating a pod, but I’m uncertain if I need to specify the secret in the pod definition or just in the environment section.
upvoted 0 times
...
Delisa
2 months ago
This question seems similar to one we practiced where we had to expose a config map as an environment variable. I hope I can apply that knowledge here.
upvoted 0 times
...
Na
3 months ago
Ah, I see what I need to do now. I'll create the secret first, then in the pod definition I'll use the `env` field to reference the secret value by its key. Simple!
upvoted 0 times
...
Germaine
3 months ago
I'm a little confused about the difference between the `env` and `envFrom` fields in the pod definition. I'll need to double-check the documentation to make sure I'm using the right one for this task.
upvoted 0 times
...
Marylou
3 months ago
I think I remember how to create a secret, but I'm not entirely sure about the exact command syntax.
upvoted 0 times
...
Merissa
3 months ago
No problem, I've done this kind of task before. I'll use the `kubectl create secret` command to create the secret, and then in the pod definition I'll use the `env` field to expose the secret value as an environment variable.
upvoted 0 times
...
Avery
4 months ago
I think option A looks good.
upvoted 0 times
...
Edwin
4 months ago
I feel a bit confused about the naming conventions for the environment variable. Was it COOL_VARIABLE or something else?
upvoted 0 times
...
Mirta
4 months ago
Hmm, I'm a bit unsure about how to create the secret and then reference it in the pod. I'll need to review the syntax for that.
upvoted 0 times
...
Lanie
4 months ago
Okay, this looks straightforward. I'll start by creating the secret with the key/value pair, then I'll create the nginx pod and add the environment variable to expose the secret value.
upvoted 0 times
Angelo
3 months ago
Sounds good! Make sure to double-check the key/value pair.
upvoted 0 times
...
...

Save Cancel