守护进程集
apiVersion: apps/v1
import "k8s.io/api/apps/v1"
守护进程集
DaemonSet 代表守护进程集的配置。
apiVersion: apps/v1
kind: DaemonSet
metadata (ObjectMeta)
标准对象的元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec (DaemonSetSpec)
此守护进程集的预期行为。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
status (DaemonSetStatus)
此守护进程集的当前状态。此数据可能在一定时间窗口内过时。由系统填充。只读。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
DaemonSetSpec
DaemonSetSpec 是守护进程集的规范。
selector (LabelSelector), 必须
对守护进程集管理的 Pod 的标签查询。必须匹配才能被控制。它必须匹配 Pod 模板的标签。更多信息:https://kubernetes.ac.cn/docs/concepts/overview/working-with-objects/labels/#label-selectors
template (PodTemplateSpec), 必须
描述将要创建的 Pod 的对象。DaemonSet 将在每个匹配模板节点选择器的节点(或在没有指定节点选择器的情况下,在每个节点)上创建此 Pod 的一个副本。唯一允许的 template.spec.restartPolicy 值是“Always”。更多信息:https://kubernetes.ac.cn/docs/concepts/workloads/controllers/replicationcontroller#pod-template
minReadySeconds (int32)
新创建的 DaemonSet Pod 在其任何容器崩溃之前应处于就绪状态的最小秒数,以便被视为可用。默认为 0(Pod 将在其就绪后立即被视为可用)。
updateStrategy (DaemonSetUpdateStrategy)
用于用新 Pod 替换现有 DaemonSet Pod 的更新策略。
DaemonSetUpdateStrategy 是一个用于控制 DaemonSet 更新策略的结构。
updateStrategy.type (string)
守护进程集更新类型。可以是“RollingUpdate”或“OnDelete”。默认为 RollingUpdate。
updateStrategy.rollingUpdate (RollingUpdateDaemonSet)
滚动更新配置参数。仅在 type = "RollingUpdate" 时存在。
updateStrategy.rollingUpdate.maxSurge (IntOrString)
在更新期间,具有现有可用 DaemonSet Pod 的节点的最大数量,这些节点可以拥有更新的 DaemonSet Pod。值可以是绝对数量(例如:5)或期望 Pod 的百分比(例如:10%)。如果 MaxUnavailable 为 0,则此值不能为 0。绝对数量是通过向上取整从百分比计算出来的,最小值为 1。默认值为 0。示例:当此值设置为 30% 时,最多 30% 的应运行守护进程 Pod 的总节点数量(即 status.desiredNumberScheduled)可以在标记旧 Pod 为已删除之前创建其新 Pod。更新从在 30% 的节点上启动新 Pod 开始。一旦更新的 Pod 可用(至少在 minReadySeconds 内处于就绪状态),该节点上的旧 DaemonSet Pod 就会被标记为已删除。如果旧 Pod 因任何原因变得不可用(就绪状态变为 false,被驱逐或被排空),则会在该节点上立即创建更新的 Pod,而无需考虑激增限制。允许激增意味着在就绪检查失败的情况下,守护进程集在任何给定节点上消耗的资源可能会翻倍,因此资源密集型守护进程集应该考虑到它们可能会在中断期间导致驱逐。
IntOrString 是一种可以保存 int32 或字符串的类型。在使用 JSON 或 YAML 序列化和反序列化时,它会生成或使用内部类型。这使您可以拥有例如可以接受名称或数字的 JSON 字段。
updateStrategy.rollingUpdate.maxUnavailable (IntOrString)
在更新期间,可能不可用的 DaemonSet Pod 的最大数量。值可以是绝对数量(例如:5)或更新开始时 DaemonSet Pod 总数量的百分比(例如:10%)。绝对数量是通过向上取整从百分比计算出来的。如果 MaxSurge 为 0,则此值不能为 0。默认值为 1。示例:当此值设置为 30% 时,最多 30% 的应运行守护进程 Pod 的总节点数量(即 status.desiredNumberScheduled)可以随时停止他们的 Pod 以进行更新。更新从停止最多 30% 的这些 DaemonSet Pod 开始,然后在其位置启动新的 DaemonSet Pod。一旦新 Pod 可用,它就会继续进行其他 DaemonSet Pod,从而确保在更新期间始终至少有 70% 的原始 DaemonSet Pod 可用。
IntOrString 是一种可以保存 int32 或字符串的类型。在使用 JSON 或 YAML 序列化和反序列化时,它会生成或使用内部类型。这使您可以拥有例如可以接受名称或数字的 JSON 字段。
revisionHistoryLimit (int32)
要保留的旧历史记录数量以允许回滚。这是区分显式零和未指定的指针。默认为 10。
DaemonSetStatus
DaemonSetStatus 代表守护进程集的当前状态。
numberReady (int32), 必须
numberReady 是应运行守护进程 Pod 的节点数量,并且其中一个或多个守护进程 Pod 正在运行并具有就绪条件。
numberAvailable (int32)
应运行守护进程 Pod 的节点数量,并且其中一个或多个守护进程 Pod 正在运行并可用(至少在 spec.minReadySeconds 内处于就绪状态)。
numberUnavailable (int32)
应运行守护进程 Pod 的节点数量,并且其中没有守护进程 Pod 正在运行并可用(至少在 spec.minReadySeconds 内处于就绪状态)。
numberMisscheduled (int32), 必须
正在运行守护进程 Pod 的节点数量,但不应该运行守护进程 Pod。更多信息:https://kubernetes.ac.cn/docs/concepts/workloads/controllers/daemonset/
desiredNumberScheduled (int32), 必须
应运行守护进程 Pod 的节点总数(包括正确运行守护进程 Pod 的节点)。更多信息:https://kubernetes.ac.cn/docs/concepts/workloads/controllers/daemonset/
currentNumberScheduled (int32), 必须
正在运行至少 1 个守护进程 Pod 的节点数量,并且应该运行守护进程 Pod。更多信息:https://kubernetes.ac.cn/docs/concepts/workloads/controllers/daemonset/
updatedNumberScheduled (int32)
正在运行更新的守护进程 Pod 的节点总数
collisionCount (int32)
DaemonSet 的哈希冲突计数。DaemonSet 控制器使用此字段作为碰撞避免机制,当它需要为最新的 ControllerRevision 创建名称时。
conditions ([]DaemonSetCondition)
补丁策略:按键
type
合并表示 DaemonSet 当前状态的最新可用观察结果。
DaemonSetCondition 描述了特定时间点的 DaemonSet 状态。
conditions.status (string), 必须
条件状态,True、False、Unknown 之一。
conditions.type (string), 必须
DaemonSet 条件类型。
conditions.lastTransitionTime (Time)
条件从一种状态转换到另一种状态的最后时间。
Time 是 time.Time 的包装器,它支持对 YAML 和 JSON 的正确序列化。为 time 包提供的许多工厂方法提供了包装器。
conditions.message (string)
一个关于转换的详细信息的可读信息。
conditions.reason (string)
条件最后转换的原因。
observedGeneration (int64)
守护进程集控制器观察到的最新代。
DaemonSetList
DaemonSetList 是守护进程集的集合。
apiVersion: apps/v1
kind: DaemonSetList
metadata (ListMeta)
标准列表元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
items ([]DaemonSet), 必须
守护进程集列表。
操作
get
读取指定的 DaemonSet
HTTP 请求
GET /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
参数
响应
200 (DaemonSet): OK
401: 未经授权
get
读取指定 DaemonSet 的状态
HTTP 请求
GET /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status
参数
响应
200 (DaemonSet): OK
401: 未经授权
list
列出或观察 DaemonSet 类型的对象
HTTP 请求
GET /apis/apps/v1/namespaces/{namespace}/daemonsets
参数
namespace (在路径中): string, 必须
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (查询中): 整数
watch (查询中): 布尔值
响应
200 (DaemonSetList): 正常
401: 未经授权
list
列出或观察 DaemonSet 类型的对象
HTTP 请求
GET /apis/apps/v1/daemonsets
参数
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (查询中): 整数
watch (查询中): 布尔值
响应
200 (DaemonSetList): 正常
401: 未经授权
create
创建一个 DaemonSet
HTTP 请求
POST /apis/apps/v1/namespaces/{namespace}/daemonsets
参数
namespace (在路径中): string, 必须
body: DaemonSet, 必需
dryRun (查询中): 字符串
fieldManager (查询中): 字符串
fieldValidation (查询中): 字符串
pretty (在查询中): string
响应
200 (DaemonSet): OK
201 (DaemonSet): 已创建
202 (DaemonSet): 已接受
401: 未经授权
update
替换指定的 DaemonSet
HTTP 请求
PUT /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
参数
name (在路径中): string, 必须
DaemonSet 的名称
namespace (在路径中): string, 必须
body: DaemonSet, 必需
dryRun (查询中): 字符串
fieldManager (查询中): 字符串
fieldValidation (查询中): 字符串
pretty (在查询中): string
响应
200 (DaemonSet): OK
201 (DaemonSet): 已创建
401: 未经授权
update
替换指定 DaemonSet 的状态
HTTP 请求
PUT /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status
参数
name (在路径中): string, 必须
DaemonSet 的名称
namespace (在路径中): string, 必须
body: DaemonSet, 必需
dryRun (查询中): 字符串
fieldManager (查询中): 字符串
fieldValidation (查询中): 字符串
pretty (在查询中): string
响应
200 (DaemonSet): OK
201 (DaemonSet): 已创建
401: 未经授权
patch
部分更新指定的 DaemonSet
HTTP 请求
PATCH /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
参数
name (在路径中): string, 必须
DaemonSet 的名称
namespace (在路径中): string, 必须
body: Patch, 必需
dryRun (查询中): 字符串
fieldManager (查询中): 字符串
fieldValidation (查询中): 字符串
force (查询中): 布尔值
pretty (在查询中): string
响应
200 (DaemonSet): OK
201 (DaemonSet): 已创建
401: 未经授权
patch
部分更新指定 DaemonSet 的状态
HTTP 请求
PATCH /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status
参数
name (在路径中): string, 必须
DaemonSet 的名称
namespace (在路径中): string, 必须
body: Patch, 必需
dryRun (查询中): 字符串
fieldManager (查询中): 字符串
fieldValidation (查询中): 字符串
force (查询中): 布尔值
pretty (在查询中): string
响应
200 (DaemonSet): OK
201 (DaemonSet): 已创建
401: 未经授权
delete
删除一个 DaemonSet
HTTP 请求
DELETE /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
参数
name (在路径中): string, 必须
DaemonSet 的名称
namespace (在路径中): string, 必须
body: DeleteOptions
dryRun (查询中): 字符串
gracePeriodSeconds (查询中): 整数
pretty (在查询中): string
propagationPolicy (查询中): 字符串
响应
200 (Status): 正常
202 (Status): 已接受
401: 未经授权
deletecollection
删除 DaemonSet 集合
HTTP 请求
DELETE /apis/apps/v1/namespaces/{namespace}/daemonsets
参数
namespace (在路径中): string, 必须
body: DeleteOptions
continue (在查询中): string
dryRun (查询中): 字符串
fieldSelector (在查询中): string
gracePeriodSeconds (查询中): 整数
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
propagationPolicy (查询中): 字符串
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (查询中): 整数
响应
200 (Status): 正常
401: 未经授权
此页面自动生成。
如果您想报告有关此页面的问题,请在您的问题描述中提及此页面是自动生成的。修复可能需要在 Kubernetes 项目中的其他地方进行。