CKA Logging and Monitoring Flashcards
6 cards from real CKA practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 6 CKA Logging and Monitoring flashcards as text
How do you view logs from a running pod named 'webapp'?
Answer: kubectl logs webapp
Use `kubectl logs ` to retrieve logs from a running pod.
Which flag streams live log output continuously from a pod?
Answer: --follow
The `--follow` (or `-f`) flag streams live log output from a pod, similar to `tail -f`.
How do you view logs from a specific container 'nginx' inside a multi-container pod 'mypod'?
Answer: kubectl logs mypod -c nginx
The `-c ` (or `--container`) flag targets a specific container in a multi-container pod.
How do you retrieve logs from a previously crashed/terminated container in a pod?
Answer: kubectl logs mypod --previous
The `--previous` flag retrieves logs from the last terminated container instance in a pod.
Where does Kubernetes store container log files on the node by default?
Answer: /var/log/containers/
Container logs are written to `/var/log/containers/` on the node, symlinked from `/var/log/pods/`.
Which command displays only the last 50 lines of logs from pod 'api'?
Answer: kubectl logs api --tail=50
The `--tail=` flag limits log output to the last N lines, mirroring the Unix `tail` command.
How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy
Sources & references
Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy
- training.linuxfoundation.org — Test delivery, eligibility, fees, time limit, exam information · verified Nov 2026
- docs.linuxfoundation.org — Passing score, renewal, score release, score validity, test dates · verified Oct 2026