INFRA-DEVOPS Contents

Debugging Pods and Nodes (events, logs, states)

Debug pods and nodes using events, logs, states, and node pressure signals without making the incident worse.

On this page

Pod Debug Order

  1. Status: Pending / CrashLoopBackOff / ImagePullBackOff
  2. Events: why the scheduler/runtime is unhappy
  3. Logs: application + sidecars
  4. Spec: probes, resources, mounts, env

Pod Commands

kubectl -n <ns> get pod <pod> -o wide
kubectl -n <ns> describe pod <pod> | sed -n '1,260p'
kubectl -n <ns> logs <pod> --tail=200
kubectl -n <ns> logs <pod> -c <container> --tail=200

Pending Pods

kubectl -n <ns> describe pod <pod> | grep -n 'Events' -A60
kubectl get nodes
kubectl describe node <node> | sed -n '1,220p'

Node Pressure Signals

kubectl describe node <node> | grep -n -E 'Pressure|DiskPressure|MemoryPressure|PIDPressure' -A2
kubectl -n kube-system get pods -o wide

Failure Modes

  • CrashLoopBackOff: bad config/secret, probe too strict, app exit.
  • ImagePullBackOff: registry/DNS/auth, wrong tag, rate limits.
  • NotReady node: CNI issues, disk full, kubelet/runtime down.