CKAD · Application Observability and Maintenance · lesson 5 of 6

Debugging Pods and Containers

How to debug failing Pods using kubectl describe, exec, and debug, including ephemeral containers for distroless images that have no shell.

18 min · Exam domain: Application Observability and Maintenance (15%)

A Pod is in CrashLoopBackOff. Restart count: 14. You have no idea what it's doing. The logs exist but they're from the last run, three minutes ago, and they don't explain why the container keeps dying. Where do you start?

The answer is almost always the same: kubectl describe pod. The Events section, six lines at the bottom of the output, tells you more than the logs do in most cases. From there, you have two more tools: kubectl exec to get a shell into a running container, and kubectl debug to get a shell into a container that won't cooperate.

Enroll to read the rest of this lesson

Free. Your progress and certificate come with it.

Enroll, free