Kubernetes Pod Troubleshooting Cheat Sheet

Logs, events, and exec patterns

Last Updated: November 21, 2025

Focus Areas

Focus
Correlate events, logs, and resource metrics
Use kubectl exec or debug pods to inspect containers

Commands & Queries

kubectl describe pod my-app-123
View recent events and causes
kubectl logs my-app-123 -c sidecar --since=10m
Tail logs for the sidecar
kubectl exec -it my-app-123 -- /bin/sh
Inspect inside the container

Summary

Gather events, logs, and live shells before restarting or redeploying pods.

💡 Pro Tip: Inspect `kubectl describe` events before grabbing logs; use `kubectl exec` for deeper inspection.
← Back to DevOps & Cloud | Browse all categories | View all cheat sheets