DaemonSet
apiVersion: apps/v1
import "k8s.io/api/apps/v1"
DaemonSet
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)
替换现有 DaemonSet Pod 的新 Pod 的更新策略。
DaemonSetUpdateStrategy 是一个用于控制 DaemonSet 更新策略的结构体。
updateStrategy.type (字符串)
守护进程集更新类型。可以是“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 被标记为删除之前,最多 30% 的应运行守护进程 Pod 的节点(即 status.desiredNumberScheduled)可以创建新 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),必需
条件的 status,可以是 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): 正常
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): OK
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): OK
401: 未授权
本页面是自动生成的。
如果你打算报告此页面存在的问题,请在问题描述中提及此页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。