O'Reilly logo

Kubernetes for Developers by Joseph Heck

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CrashLoopBackOff

You may find your pod reporting a status of CrashLoopBackOff, another incredibly common error state.

This is an error condition that happens only after a container is invoked, so it can be delayed in appearing. You will typically see it when invoking kubectl get pods:

NAME                          READY STATUS           RESTARTS AGEflask-6587cb9b66-zzw8v        1/2   CrashLoopBackOff 2        1mredis-master-75c798658b-4x9h5 1/1   Running          0        1m

This explicitly means that one of the containers in the pod has exited unexpectedly, and perhaps with a non-zero error code. The first course of action in understanding what happened is to utilize the kubectl describe command to get more detail. In this case:

kubectl describe pod flask-6587cb9b66-zzw8v

Scan through the resulting content, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required