CK.III · CKAD practice question
Which command fetches the last 50 lines of logs from container worker in Pod batch-0 in namespace jobs?
Check answer and explanation
Correct answer: kubectl logs batch-0 -c worker -n jobs --tail=50
Explanation
kubectl logs -c -n --tail=50 streams the trailing 50 log lines from the specified container.
Common trap
kubectl logs -c -n --tail=50 streams the trailing 50 log lines from the specified container.
Source: Original unofficial practice; not an official CKAD exam item
Checked against the cited text on 2026-11-30.