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.

intermediate12 min5 roundsKubernetes

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.

More: Kubernetes scenario interview questions