注:以下状态为kubernetes-1.10的映射关系,较新版本有部分改动
Pod Phase | Kubectl Status | Container Status | 备注 |
---|---|---|---|
Pending | Pending | None | Pod没有到达Kubelet之前 |
Pending | ImagePullBackOff | Pod没有到达Kubelet之后,Image拉取镜像成功之前 | |
CreateContainerConfigError | CreateContainerConfigError | 准备Container启动环境成功之前 (比如准备Volumn Mount或读取Secret) | |
ContainerCreating | ContainerCreating | Container第一次尝试启动开始 - 第一次尝试启动结束 | |
ErrImagePull | 拉镜像出错,与ImagePullBackOff状态相互切换 | ||
Running | Running | Normal | Pod正确运行 |
CrashLoopBackOff | CrashLoopBackOff | Container运行发生错误,尝试重启Container | |
Terminating | Equivocal - 不一定什么状态 | Pod DeletionTimestamp != nil | |
RunContainerError | None | Container 发生运行时错误,如 Failed create pod sandbox: rpc error: code = Unknown desc = failed to start sandbox container for pod "": Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "process_linux.go:297: getting the final child's pid from pipe caused \"EOF\"": unknown | |
Unknown, 但kubectl describe是Terminating | None | APIServer发送删除命令(即Pod DeletionTimestamp != nil),在某些原因(如NodeLost)下,没有返回结果。超时后由 Terminating 变为 Unknown。 | |
NodeLost | None | 节点丢失,仅限于Daemonset | |
Failed | ContainerCannotRun | 容器不能正确启动,通常为启动参数有误 | |
Error | 至少一个容器非正常退出,若重启策略为Always,则会尝试重启容器,状态变为CrashLoopBackOff | ||
Evicted | None | Pod被节点驱逐 | |
Unknown | |||
Succeeded | OOMKilled | 发生OOM Killed | |
OOM | 待确认 | ||
Completed | Completed | 容器运行完毕,前台程序无错误码退出 |