Container Logs

Your pod is in CrashLoopBackOff. The container has restarted 11 times and just died again 8 seconds ago. You type kubectl logs mypod and get nothing — the container is mid-restart and the logs from the previous crash are already gone. This is the moment when you find out whether you know kubectl logs or just the happy path of it.
The four patterns that cover 95% of exam tasks: viewing current output, streaming live, targeting a specific container in a multi-container spec, and recovering logs from a crash. The fifth — the sidecar streaming pattern — exists for apps you don't control.
Sign in to access this lesson
Create a free account or sign in to enroll in the CKAD — Certified Kubernetes Application Developer course and access all 44 lessons.
CKAD — Certified Kubernetes Application Developer
44 lessons