kubernetes/describe-pod

Describe Pod

Show detailed information about a pod.

pods
debugging

Command

kubectl describe pod <pod-name>

Explanation

The 'kubectl describe pod' command shows deep insights into a pod’s configuration, events, container states, node assignment, and reasons for failures. It's essential for debugging pod lifecycle issues such as image pull errors or OOM kills. The output includes an 'Events' section which often explains startup problems or restarts.

Common Use Cases

  • Debug pod initialization or crash issues
  • Inspect container environment and volume mounts
  • Review recent pod lifecycle events

Best Practices

  • Always check both 'Containers' and 'Events' sections for full context
  • Use with '-n <namespace>' for non-default namespaces

Common Mistakes to Avoid

  • Describing the wrong pod when multiple pods share a similar name
  • Ignoring the 'Events' section which contains critical failure info

Troubleshooting

Problem: Image pull back-off or crash loops

Solution: Inspect the 'Events' section for failure reasons and verify image registry access or credentials.

Examples

Describe the specified pod

kubectl describe pod my-app-pod-1234