Quick Tip: Debugging CrashLoopBackOff
Pod crashing immediately? Here is how to debug it when 'kubectl logs' returns nothing.
A one-liner to instantly see which pods are hogging your cluster's CPU. No dashboard required.
Sometimes you don’t want to open Grafana. You just want to know: “Who is eating my CPU?”
Here is the one-liner I use every day:
kubectl top pods -A --sort-by='cpu' | head -10kubectl top pods: Uses the Metrics Server to fetch real-time usage.-A: Checks All Namespaces (don’t hide in default).--sort-by='cpu': The magic flag. Sorts the output.| head -10: Shows only the top offenders.Want to find memory leaks instead? Just swap the sort key:
kubectl top pods -A --sort-by='memory' | head -10Add this to your .zshrc as an alias (kcpu and kmem) and thank me later.
Marketing Lead
Pod crashing immediately? Here is how to debug it when 'kubectl logs' returns nothing.
Get Kubernetes and ECS cost tactics delivered weekly.