Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam KCNA topic 1 question 20 discussion

Actual exam question from Linux Foundation's KCNA
Question #: 20
Topic #: 1
[All KCNA Questions]

Which is the correct kubectl command to display logs in real time?

  • A. kubectl logs -p test-container-1
  • B. kubectl logs -c test-container-1
  • C. kubectl logs -l test-container-1
  • D. kubectl logs -f test-container-1
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
dadaarce
1 month, 3 weeks ago
Selected Answer: D
The -f or --follow flag is used to stream logs in real time.
upvoted 1 times
...
phcunha
1 month, 4 weeks ago
D. kubectl logs -f test-container-1 Explanation: The -f flag in the kubectl logs command stands for "follow," which allows you to continuously stream the logs in real-time as new log entries are added. This is useful for monitoring applications or troubleshooting issues as they occur. An analogy for this command could be tuning in to a live radio broadcast. When you listen to a live radio show, you want to hear the content as it's being broadcasted, rather than just a recording of past broadcasts. Similarly, using kubectl logs -f lets you "tune in" to the ongoing activity of a container, receiving log updates in real-time.
upvoted 1 times
...
nvtienanh
7 months, 2 weeks ago
Selected Answer: D
D is correct
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 ...