List of all reasons for Container States in kubernetes

9/6/2019

Is it possible to have a list of all reasons for the various container states mentioned in kubernetes. So list of reasons for the state Waiting, Running and Terminated. For example, a state of Waiting can have a Reason of ErrImagePull or CrashLoopBackOff.

Please note that this is different from the list of events given in the answer to this question. I have also looked at the docker container statuses mentioned here but they don't seem to cover all the possibilities.

-- user3079474
docker
kubernetes

1 Answer

9/11/2019

What you are looking for is this document on official Kubernetes repository, which describes list of reasons for each of container status. For Waiting container status it is possible to get one of following reason:

  • ContainerCreating,
  • CrashLoopBackOff,
  • ErrImagePull,
  • ImagePullBackOff,
  • CreateContainerConfigError,
  • InvalidImageName,
  • CreateContainerError.

For Terminated container status there are different list of reasons:

  • OOMKilled,
  • Error,
  • Completed,
  • ContainerCannotRun,
  • DeadlineExceeded

And so on, I hope it will helps you.

-- muscat
Source: StackOverflow