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)
用于用新 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 的最大数量,这些 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 并具有一个或多个运行状态为可用(至少在 spec.minReadySeconds 内处于就绪状态)的守护进程 Pod 的节点数量。
numberUnavailable (int32)
应运行守护进程 Pod 但没有一个运行状态为可用(至少在 spec.minReadySeconds 内处于就绪状态)的守护进程 Pod 的节点数量。
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), required
条件的状态,可以是 True、False 或 Unknown 之一。
conditions.type (string), required
DaemonSet 条件的类型。
conditions.lastTransitionTime (Time)
条件从一种状态转换到另一种状态的最后时间。
Time 是 time.Time 的包装器,它支持正确地将数据编组到 YAML 和 JSON 中。包装器为 time 包提供的许多工厂方法提供。
conditions.message (string)
一条人类可读的消息,指示有关转换的详细信息。
conditions.reason (string)
条件最后一次转换的原因。
observedGeneration (int64)
daemon set 控制器观察到的最新一代。
DaemonSetList
DaemonSetList 是 daemon set 的集合。
apiVersion: apps/v1
kind: DaemonSetList
metadata (ListMeta)
标准列表元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
items ([]DaemonSet), required
daemon set 的列表。
操作
get
读取指定的 DaemonSet
HTTP 请求
GET /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
参数
name (在路径中): string, required
DaemonSet 的名称
namespace (在路径中): string, required
pretty (在查询中): string
响应
200 (DaemonSet): OK
401: 未授权
get
读取指定 DaemonSet 的状态
HTTP 请求
GET /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status
参数
name (在路径中): string, required
DaemonSet 的名称
namespace (在路径中): string, required
pretty (在查询中): string
响应
200 (DaemonSet): OK
401: 未授权
list
列出或观察 DaemonSet 类型的对象
HTTP 请求
GET /apis/apps/v1/namespaces/{namespace}/daemonsets
参数
namespace (在路径中): string, required
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
watch (在查询中): boolean
响应
200 (DaemonSetList): OK
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): OK
401: 未授权
create
创建一个 DaemonSet
HTTP 请求
POST /apis/apps/v1/namespaces/{namespace}/daemonsets
参数
namespace (在路径中): string, required
body: DaemonSet, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (DaemonSet): OK
201 (DaemonSet): 已创建
202 (DaemonSet): 已接受
401: 未授权
update
替换指定的 DaemonSet
HTTP 请求
PUT /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
参数
name (在路径中): string, required
DaemonSet 的名称
namespace (在路径中): string, required
body: DaemonSet, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (DaemonSet): OK
201 (DaemonSet): 已创建
401: 未授权
update
替换指定 DaemonSet 的状态
HTTP 请求
PUT /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status
参数
name (在路径中): string, required
DaemonSet 的名称
namespace (在路径中): string, required
body: DaemonSet, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (DaemonSet): OK
201 (DaemonSet): 已创建
401: 未授权
patch
部分更新指定的 DaemonSet
HTTP 请求
PATCH /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
参数
name (在路径中): string, required
DaemonSet 的名称
namespace (在路径中): string, required
body: Patch, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (DaemonSet): OK
201 (DaemonSet): 已创建
401: 未授权
patch
部分更新指定 DaemonSet 的状态
HTTP 请求
PATCH /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status
参数
name (在路径中): string, required
DaemonSet 的名称
namespace (在路径中): string, required
body: Patch, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (DaemonSet): OK
201 (DaemonSet): 已创建
401: 未授权
delete
删除一个 DaemonSet
HTTP 请求
DELETE /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}
参数
name (在路径中): string, required
DaemonSet 的名称
namespace (在路径中): string, required
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
响应
200 (Status): OK
202 (Status): 已接受
401: 未授权
deletecollection
删除 DaemonSet 的集合
HTTP 请求
DELETE /apis/apps/v1/namespaces/{namespace}/daemonsets
参数
namespace (在路径中): string, required
body: DeleteOptions
continue (在查询中): string
dryRun (在查询中): string
fieldSelector (在查询中): string
gracePeriodSeconds (在查询中): integer
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
响应
200 (Status): OK
401: 未授权
此页面是自动生成的。
如果您打算报告此页面的问题,请在您的问题描述中提及该页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。