kubernetes: Init containers do not have same waiting state reasons as regular containers

/kind bug

What happened:

When regular containers are starting up, they go through various waiting reasons like ContainerCreating and others. This allows one to read and get better understanding of what is happening to the container. But when looking at init containers, when they are in the waiting state, their reason is always PodInitializing.

What you expected to happen:

I do expect that regular containers in the pod have reason set to PodInitializing, but that init containers go through a regular set of reasons during their waiting state. This could then allow us to monitor and detect how long each reason-state lasts and detect and deviations and issues.

How to reproduce it (as minimally and precisely as possible):

Just create a simple pod with an init container. Create it. Observe container states and see that they are always in waiting state and reason PodInitializing.

Environment:

  • Kubernetes version (use kubectl version): v1.11.3
  • Cloud provider or hardware configuration: custom server
  • OS (e.g. from /etc/os-release): Ubuntu 17.10
  • Kernel (e.g. uname -a): 4.4.0-121-generic #145-Ubuntu SMP Fri Apr 13 13:47:23 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 28 (18 by maintainers)

Most upvoted comments

Sending a design proposal or KEP to https://github.com/kubernetes/enhancements is appreciated.

From my perspective, user should describe the pod or get events of the pod to know why a pod is not started. https://kubernetes.io/docs/tasks/debug-application-cluster/debug-application/#my-pod-stays-pending is good reading material for that.