Observability and troubleshooting, topic 50 of 61
Debugging applications
Most problems show in a Pod's status and events. Pending is scheduling, so read kubectl describe pod. ImagePullBackOff is a wrong image name or a missing pull secret. CrashLoopBackOff is the app exiting: read kubectl logs --previous. OOMKilled is a memory limit.
A Service that reaches nothing usually has a selector that matches no ready Pod, so check kubectl get endpointslices. For a running container without a shell, kubectl debug adds an ephemeral container with the tools you need.
On Opsfolk
- CKA practice: Advanced Kubernetes administrationQuiz, 40 questionsSigned-in members
- Kubernetes clusterPlayground, 60 minutesPremium members
Elsewhere
- Troubleshooting applicationsOfficial
- Debug running PodsOfficial