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, ...

Get Kubernetes for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.