DaemonSet
apiVersion: apps/v1
import "k8s.io/api/apps/v1"
DaemonSet
DaemonSet 表示守护进程集的配置。
apiVersion: apps/v1
kind: DaemonSet
metadata (ObjectMeta)
标准对象的 metadata。更多信息请参见: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% 时,在旧 Pod 被标记为删除之前,总共应该运行守护进程 Pod 的节点数量(即 status.desiredNumberScheduled)中,最多 30% 可以创建新 Pod。更新通过在 30% 的节点上启动新 Pod 开始。一旦更新后的 Pod 可用(就绪状态至少持续 minReadySeconds),该节点上的旧 DaemonSet Pod 将被标记为删除。如果旧 Pod 因任何原因变得不可用(就绪状态变为 false,被驱逐或被排空),则立即在该节点上创建更新后的 Pod,而不考虑激增限制。允许激增意味着如果就绪检查失败,守护进程集在任何给定节点上消耗的资源可能翻倍,因此资源密集型守护进程集应考虑到它们可能在中断期间导致驱逐。
IntOrString 是一个可以保存 int32 或 string 的类型。在 JSON 或 YAML 序列化和反序列化时,它生成或消费内部类型。这使得你可以拥有一个可以接受名称或数字的 JSON 字段。
updateStrategy.rollingUpdate.maxUnavailable (IntOrString)
在更新期间,最大不可用的 DaemonSet Pod 数量。值可以是绝对数字(例如:5)或更新开始时 DaemonSet Pod 总数的百分比(例如:10%)。绝对数字根据百分比计算,向上取整。如果 MaxSurge 为 0,则此值不能为 0。默认值为 1。示例:当此值设置为 30% 时,在任何给定时间,总共应该运行守护进程 Pod 的节点数量(即 status.desiredNumberScheduled)中,最多 30% 的 Pod 可以停止进行更新。更新首先停止最多 30% 的 DaemonSet Pod,然后在它们的位置启动新的 DaemonSet Pod。一旦新 Pod 可用,它会继续处理其他 DaemonSet Pod,从而确保在更新期间始终至少有 70% 的原始 DaemonSet Pod 可用。
IntOrString 是一个可以保存 int32 或 string 的类型。在 JSON 或 YAML 序列化和反序列化时,它生成或消费内部类型。这使得你可以拥有一个可以接受名称或数字的 JSON 字段。
revisionHistoryLimit (int32)
保留旧历史记录的数量,以允许回滚。这是一个指针,用于区分显式的零和未指定。默认为 10。
DaemonSetStatus
DaemonSetStatus 表示守护进程集的当前状态。
numberReady (int32),必需
numberReady 是应该运行守护进程 Pod 并且有一个或多个处于 Ready 状态的守护进程 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)
Patch 策略:按键
type
合并Map:合并期间将保留键 type 的唯一值
表示 DaemonSet 当前状态的最新可用观测结果。
DaemonSetCondition 描述 DaemonSet 在特定时间点的状态。
conditions.status (string),必需
条件的 status,取值为 True, False, Unknown 之一。
conditions.type (string),必需
DaemonSet 条件的类型。
conditions.lastTransitionTime (Time)
条件上次从一个 status 转换为另一个 status 的时间。
Time 是 time.Time 的封装,支持正确的 YAML 和 JSON 序列化和反序列化。time 包提供的许多工厂方法都有相应的封装。
conditions.message (string)
人类可读的消息,指示状态转换的详细信息。
conditions.reason (string)
条件上次状态转换的原因。
observedGeneration (int64)
守护进程集控制器观测到的最新一代。
DaemonSetList
DaemonSetList 是守护进程集的集合。
apiVersion: apps/v1
kind: DaemonSetList
metadata (ListMeta)
标准列表 metadata。更多信息请参见: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): 成功
401: 未授权
get
读取指定的 DaemonSet 的状态
HTTP 请求
GET /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status
参数
响应
200 (DaemonSet): 成功
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 (在查询中): integer
watch (在查询中): boolean
响应
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 (在查询中): integer
watch (在查询中): boolean
响应
200 (DaemonSetList): 成功
401: 未授权
create
创建一个 DaemonSet
HTTP 请求
POST /apis/apps/v1/namespaces/{namespace}/daemonsets
参数
namespace (在路径中): string,必需
body: DaemonSet,必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (DaemonSet): 成功
201 (DaemonSet): 已创建
202 (DaemonSet): 已接受
401: 未授权
update
替换指定的 DaemonSet
HTTP 请求
PUT /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
参数
name (在路径中): string,必需
DaemonSet 的名称
namespace (在路径中): string,必需
body: DaemonSet,必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (DaemonSet): 成功
201 (DaemonSet): 已创建
401: 未授权
update
替换指定的 DaemonSet 的状态
HTTP 请求
PUT /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status
参数
name (在路径中): string,必需
DaemonSet 的名称
namespace (在路径中): string,必需
body: DaemonSet,必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (DaemonSet): 成功
201 (DaemonSet): 已创建
401: 未授权
patch
部分更新指定的 DaemonSet
HTTP 请求
PATCH /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
参数
name (在路径中): string,必需
DaemonSet 的名称
namespace (在路径中): string,必需
body: Patch,必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (DaemonSet): 成功
201 (DaemonSet): 已创建
401: 未授权
patch
部分更新指定的 DaemonSet 的状态
HTTP 请求
PATCH /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status
参数
name (在路径中): string,必需
DaemonSet 的名称
namespace (在路径中): string,必需
body: Patch,必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (DaemonSet): 成功
201 (DaemonSet): 已创建
401: 未授权
delete
删除一个 DaemonSet
HTTP 请求
DELETE /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
参数
name (在路径中): string,必需
DaemonSet 的名称
namespace (在路径中): string,必需
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (在查询中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查询中): boolean
pretty (在查询中): string
propagationPolicy (在查询中): string
响应
200 (Status): 成功
202 (Status): 已接受
401: 未授权
deletecollection
删除 DaemonSet 集合
HTTP 请求
DELETE /apis/apps/v1/namespaces/{namespace}/daemonsets
参数
namespace (在路径中): string,必需
body: DeleteOptions
continue (在查询中): string
dryRun (在查询中): string
fieldSelector (在查询中): string
gracePeriodSeconds (在查询中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查询中): boolean
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
响应
200 (Status): 成功
401: 未授权
本页面是自动生成的。
如果您打算报告此页面的问题,请在问题描述中提及该页面是自动生成的。修复可能需要在 Kubernetes 项目中的其他地方进行。