Intermediate By Samson Tanimawo, PhD Published Oct 2, 2026 5 min read

kubectl Debug Cheat Sheet

Every kubectl command an on-call reaches for under a 3am page. Grouped by use case so you don't have to think, just type.

Triage in 30 seconds

Start wide, then narrow. The first three commands tell you whether the cluster is actually broken or just one pod misbehaving.

Logs

Most incidents resolve in this section. Tail the right container, the right time window, and you're 80% done.

Exec and debug

When logs don't tell you enough, get inside. kubectl debug is criminally underused.

Networking

Half of "the app is down" pages are actually networking. Verify the service routes, the endpoints exist, and DNS resolves before you blame the app.

Resource pressure

OOMKills, throttling, evictions. Look here when pods restart on their own or latency spikes for no reason.

Flags worth memorising

The flags that turn a 5-command investigation into a 1-command answer.