Pod Stuck in CrashLoopBackOff After a Deploy
A new deploy leaves a pod in CrashLoopBackOff. A teammate wants to bump CPU and memory. Defend how you actually diagnose it.
Answer key reviewed by Branko Petric
Read first: Debugging Kubernetes: Diagnose Pods and Fix Failures
Your decision
After a deploy, a pod is stuck in CrashLoopBackOff. A teammate says just give it more CPU and memory and it will settle. How do you actually diagnose and fix this?
The situation
You roll out a new version of a service to Kubernetes. One pod never reaches Ready; kubectl get pods shows it cycling through Running and CrashLoopBackOff with a rising restart count.
Context
The deploy changed the app version and added a new environment variable. The cluster has spare capacity. A teammate, eager to move on, says the pod is probably just resource-starved and you should raise the CPU and memory limits.
Related challenges
- Service A Intermittently Cannot Reach Service B
One in twenty calls between two services fails. A teammate wants to add retries and move on. Defend how you actually find the cause.
- A Container in Prod Is Mining Crypto
A pod is pegging CPU running a crypto miner. A teammate wants to kubectl delete it and move on. Defend the real response.
- Pods Keep OOMKilling: Scale Up or Fix the Leak?
A service OOMKills every few hours. Adding replicas or raising memory limits buys time. Defend whether to scale around it or fix the root cause.
- A Traffic Spike Caused an Outage. Autoscaling Did Not Save You.
A spike took the service down even though autoscaling was on. A teammate wants to crank the max replicas. Defend the real fix.