KubeEdge源码学习4:k8s相关

本文仅为个人的学习笔记(速记),不具任何参考意义。
k8s相关的东西。

状态

ContainersReady、PodReady、PodScheduled等等,在k8s.io/api/core/v1/types.go定义。可在kubeedge源码搜索变量名称。

1
2
3
4
5
6
type PodConditionType string
ContainersReady PodConditionType = "ContainersReady"
PodInitialized PodConditionType = "Initialized"
PodReady PodConditionType = "Ready"
PodScheduled PodConditionType = "PodScheduled"
PodReasonUnschedulable = "Unschedulable"

pod阶段状态:

1
2
3
4
5
6
type PodPhase string
PodPending PodPhase = "Pending"
PodRunning PodPhase = "Running"
PodSucceeded PodPhase = "Succeeded"
PodFailed PodPhase = "Failed"
PodUnknown PodPhase = "Unknown"