I broke five Deployments on purpose in a lab cluster. A missing env var, a command that doesn't exist in the image, a memory limit that's too low, a migration written as a Deployment, and a liveness probe on the wrong port.
Then I asked Kubernetes how they were doing.
$ kubectl get pods -n breakfix -o 'custom-columns=NAME:.metadata.name,PHASE:.status.phase,LAST:.status.containerStatuses[0].lastState.terminated.reason,EXIT:.status.containerStatuses[0].lastState.terminated.exitCode,RESTARTS:.status.containerStatuses[0].restartCount' NAME PHASE LAST EXIT RESTARTS cache-warmer-676bdc54f6-b2w97 Running OOMKilled 137 5 db-migrate-657dcb95cd-s45rc Running Completed 0 5 orders-api-5c9f9944f9-tbghc Running Error 1 5 report-worker-66cc4877f7-jpbrt Running StartError 128 5 web-dc8fdcb94-26gqv Running Completed 0 6
Enter fullscreen mode
Exit fullscreen mode
PHASE says Running for all five. Every single one was in a crash loop.
The plain kubectl get pods isn't much better.…