Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation Exam CKA Topic 4 Question 74 Discussion

Actual exam question for Linux Foundation's CKA exam
Question #: 74
Topic #: 4
[All CKA Questions]

Print pod name and start time to ''/opt/pod-status'' file

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Jenise
2 months ago
You know, if you want to print the pod name and start time, you should probably use a command that, you know, prints the pod name and start time.
upvoted 0 times
...
Dorothea
2 months ago
Elementary, my dear Watson! The answer is clearly flawed, as it does not account for the start time. Elementary!
upvoted 0 times
Argelia
29 days ago
Ah, I see now. Thank you for the clarification on how to get the start time along with the pod name.
upvoted 0 times
...
Kindra
30 days ago
To get the start time, you can use 'kubectl get pods -o=jsonpath={range .items[*]}{.metadata.name}{'\t'}{.status.startTime}{'\n'}{end}'
upvoted 0 times
...
Gladys
1 months ago
You're right, the answer only provides the pod name and IP, not the start time.
upvoted 0 times
...
...
Fannie
3 months ago
Yes, it's 'kubect1 get pods -o=jsonpath='{range .items[*]}{.metadata.name}{\'\\t\'}{.status.startTime}{\'\\n\'}{end}'
upvoted 0 times
...
Aleta
3 months ago
Hold on, shouldn't we be using 'kubectl' instead of 'kubect1'? I think there might be a typo in the answer.
upvoted 0 times
Cyndy
2 months ago
Thanks for pointing that out, it should definitely be 'kubectl' in the command.
upvoted 0 times
...
Mitzie
2 months ago
Yes, you are correct. It should be 'kubectl' instead of 'kubect1'. Good catch!
upvoted 0 times
...
Whitley
2 months ago
You're right, it should be 'kubectl' instead of 'kubect1'. Thanks for catching that!
upvoted 0 times
...
...
Jonelle
3 months ago
This looks like it could work, but I'm not a fan of using that many nested commands. Isn't there a simpler way to do this?
upvoted 0 times
...
Richelle
3 months ago
I agree, but I remember the command to print pod name and start time.
upvoted 0 times
...
Johnetta
3 months ago
Hmm, I'm not sure this is the best way to get the pod name and start time. Isn't there a more efficient command we can use?
upvoted 0 times
...
Yuki
3 months ago
Wait, we need to print the pod name and start time, not just the pod IP. This answer is missing key information.
upvoted 0 times
Ronald
2 months ago
Great, now we have the pod name and start time saved to the '/opt/pod-status' file.
upvoted 0 times
...
Noble
2 months ago
Let's try running it and see if it works.
upvoted 0 times
...
Terry
2 months ago
We can use 'kubectl get pods -o=jsonpath={range .items[*]}{.metadata.name}{'\t'}{.status.startTime}{'\n'}{end}' to print the pod name and start time.
upvoted 0 times
...
Judy
2 months ago
That command will give us the information we need.
upvoted 0 times
...
...
Fannie
3 months ago
I think this question is tricky.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77