We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Thrashing Pods

One of the most common problems you'll run into when working with Kubernetes is Pods that keep crashing and restarting. This is called "thrashing" and it's usually caused by one of a few things:

  • The application recently had a bug introduced in the latest image version
  • The application is misconfigured and can't start properly
  • A dependency of the application is misconfigured and the application can't start properly
  • The application is trying to use too much memory and is being killed by Kubernetes

What Is “CrashLoopBackoff”?

When a pod's status is CrashLoopBackoff, that means the container is crashing (the program is exiting with error code 1).

Because Kubernetes is all about building self-healing systems, it will automatically restart the container. However, each time it tries to restart the container, if it crashes again, it will wait longer and longer in between restarts. That's why it's called a "backoff".

To fix a thrashing pod, you need to find out why it's crashing. We'll do that in a later lesson.