Kubectl Command: Finding Top CPU Consumers
A one-liner to instantly see which pods are hogging your cluster's CPU. No dashboard required.
Pod crashing immediately? Here is how to debug it when 'kubectl logs' returns nothing.
CrashLoopBackOff is the “PC Load Letter” of Kubernetes. It tells you something is wrong, but not what.
Usually, you run kubectl logs my-pod, but if the app crashed instantly, the logs might be empty or already rotated.
Here are the two commands that actually help.
This shows you the logs of the last instance of the container that died.
kubectl logs my-pod --previous90% of the time, the error stack trace is hiding here.
If logs are empty, it might be a Kubernetes-level error (OOMKilled, MountFailed, etc.).
kubectl describe pod my-podScroll to the bottom. The Events section will tell you if it failed to mount a secret, failed a liveness probe, or got killed by the OOMKiller.
Stop guessing. Check --previous.
Marketing Lead
A one-liner to instantly see which pods are hogging your cluster's CPU. No dashboard required.
Get Kubernetes and ECS cost tactics delivered weekly.