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 CKA Exam - Topic 5 Question 27 Discussion

Posted by Olive on Jun 23, 2022 at 11:54 PM

Score:7%

Context

An existing Pod needs to be integrated into the Kubernetes built-in logging architecture (e. g. kubectl logs). Adding a streaming sidecar container is a good and common way to accomplish this requirement.

Task

Add a sidecar container named sidecar, using the busybox Image, to the existing Pod big-corp-app. The new sidecar container has to run the following command:

/bin/sh -c tail -n+1 -f /va r/log/big-corp-app.log

Use a Volume, mounted at /var/log, to make the log file big-corp-app.log available to the sidecar container.

Suggested Answer: A

Get Premium CKA Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
13 comments · newest first
MA
Mable 12 months ago
I’ve done this before, works like a charm!
SI
Simona 1 year ago
Nice, but what if the log file gets too big?
YO
Yong 1 year ago
Wait, can you really just use busybox for this? Seems too simple.
ST
Steffanie 1 year ago
Totally agree, sidecars are super useful for logging.
NA
Nancey 1 year ago
Sounds like a solid plan with the sidecar!
BA
Barney 1 year ago
I feel like the command for the sidecar is right, but I’m a bit confused about how to structure the YAML correctly.
EZ
Ezekiel 1 year ago
This seems similar to the practice question we did on adding sidecars, but I can't recall if we used `emptyDir` for the volume type.
BE
Benton 1 year ago
I think I remember that we need to add the sidecar container to the existing Pod, but I'm not sure about the exact syntax for the volume mounts.
PE
Pearly 1 year ago
I know we need to use `kubectl get pod` to fetch the existing Pod's configuration first, but I’m not clear on how to modify it afterward.
VE
Veronique 1 year ago
Hmm, this looks like a tricky one. I'll need to carefully read through the options and think about the map algebra syntax.
GE
Gerardo 1 year ago
Hmm, let me think about this. I know code quality metrics are important, but I'm not sure which of these options fit that category. I'll have to carefully consider each one.
FA
Fannie 1 year ago
I'm a little confused by the wording of the options. I'll need to re-read them a few times to make sure I understand the distinctions.
MA
Mattie 1 year ago
Hmm, I'm a bit unsure about the differences between these address types. I'll need to review my notes on domain names and URLs to make sure I understand the distinctions.
0/2000 characters

Save Cancel