List of all kubernetes pod statuses

8/3/2018

I am writing some monitoring tools that will track and alert on kubernetes pod statuses. I know of a handful of common ones (e.g. Running, CrashLoopBackoff, ImagePullBackoff, Exiting, etc.) but I can't seem to find a full list.

-- s g
kubernetes

1 Answer

8/3/2018

Answer as of master commit id 8a5e9ecf8febdfe5ca72d4d99340ce22cbf55cbb:

// Container event reason list
CreatedContainer        = "Created"
StartedContainer        = "Started"
FailedToCreateContainer = "Failed"
FailedToStartContainer  = "Failed"
KillingContainer        = "Killing"
PreemptContainer        = "Preempting"
BackOffStartContainer   = "BackOff"
ExceededGracePeriod     = "ExceededGracePeriod"

// Pod event reason list
FailedToKillPod                = "FailedKillPod"
FailedToCreatePodContainer     = "FailedCreatePodContainer"
FailedToMakePodDataDirectories = "Failed"
NetworkNotReady                = "NetworkNotReady"

// Image event reason list
PullingImage            = "Pulling"
PulledImage             = "Pulled"
FailedToPullImage       = "Failed"
FailedToInspectImage    = "InspectFailed"
ErrImageNeverPullPolicy = "ErrImageNeverPull"
BackOffPullImage        = "BackOff"

// kubelet event reason list
NodeReady                            = "NodeReady"
NodeNotReady                         = "NodeNotReady"
NodeSchedulable                      = "NodeSchedulable"
NodeNotSchedulable                   = "NodeNotSchedulable"
StartingKubelet                      = "Starting"
KubeletSetupFailed                   = "KubeletSetupFailed"
FailedAttachVolume                   = "FailedAttachVolume"
FailedDetachVolume                   = "FailedDetachVolume"
FailedMountVolume                    = "FailedMount"
VolumeResizeFailed                   = "VolumeResizeFailed"
VolumeResizeSuccess                  = "VolumeResizeSuccessful"
FileSystemResizeFailed               = "FileSystemResizeFailed"
FileSystemResizeSuccess              = "FileSystemResizeSuccessful"
FailedUnMountVolume                  = "FailedUnMount"
FailedMapVolume                      = "FailedMapVolume"
FailedUnmapDevice                    = "FailedUnmapDevice"
WarnAlreadyMountedVolume             = "AlreadyMountedVolume"
SuccessfulDetachVolume               = "SuccessfulDetachVolume"
SuccessfulAttachVolume               = "SuccessfulAttachVolume"
SuccessfulMountVolume                = "SuccessfulMountVolume"
SuccessfulUnMountVolume              = "SuccessfulUnMountVolume"
HostPortConflict                     = "HostPortConflict"
NodeSelectorMismatching              = "NodeSelectorMismatching"
InsufficientFreeCPU                  = "InsufficientFreeCPU"
InsufficientFreeMemory               = "InsufficientFreeMemory"
NodeRebooted                         = "Rebooted"
ContainerGCFailed                    = "ContainerGCFailed"
ImageGCFailed                        = "ImageGCFailed"
FailedNodeAllocatableEnforcement     = "FailedNodeAllocatableEnforcement"
SuccessfulNodeAllocatableEnforcement = "NodeAllocatableEnforced"
UnsupportedMountOption               = "UnsupportedMountOption"
SandboxChanged                       = "SandboxChanged"
FailedCreatePodSandBox               = "FailedCreatePodSandBox"
FailedStatusPodSandBox               = "FailedPodSandBoxStatus"

// Image manager event reason list
InvalidDiskCapacity = "InvalidDiskCapacity"
FreeDiskSpaceFailed = "FreeDiskSpaceFailed"

// Probe event reason list
ContainerUnhealthy = "Unhealthy"

// Pod worker event reason list
FailedSync = "FailedSync"

// Config event reason list
FailedValidation = "FailedValidation"

// Lifecycle hooks
FailedPostStartHook   = "FailedPostStartHook"
FailedPreStopHook     = "FailedPreStopHook"
UnfinishedPreStopHook = "UnfinishedPreStopHook"

This can be found in https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/events/event.go

Unfortunately, I'm not sure which release versions have this.

-- s g
Source: StackOverflow