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/zh-cn/docs/concepts/overview/working-with-objects/labels/#label-selectors
template (PodTemplateSpec),必需
一个描述将要创建的 Pod 的对象。DaemonSet 将在每个与模板的节点选择器匹配的节点(如果未指定节点选择器,则在每个节点上)创建一个此 Pod 的副本。唯一允许的 template.spec.restartPolicy 值是“Always”。更多信息:https://kubernetes.ac.cn/zh-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/zh-cn/docs/concepts/workloads/controllers/daemonset/
desiredNumberScheduled (int32),必需
应该运行守护进程 Pod 的节点总数(包括正确运行守护进程 Pod 的节点)。更多信息:https://kubernetes.ac.cn/zh-cn/docs/concepts/workloads/controllers/daemonset/
currentNumberScheduled (int32),必需
正在运行至少 1 个守护进程 Pod 且应该运行守护进程 Pod 的节点数。更多信息: https://kubernetes.ac.cn/zh-cn/docs/concepts/workloads/controllers/daemonset/
updatedNumberScheduled (int32)
正在运行更新后的守护进程 Pod 的节点总数
collisionCount (int32)
DaemonSet 的哈希冲突计数。当需要为最新的 ControllerRevision 创建名称时,DaemonSet 控制器使用此字段作为冲突避免机制。
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 (查询参数): 布尔值
continue (查询参数): 字符串
fieldSelector (查询参数): 字符串
labelSelector (查询参数): 字符串
limit (查询参数): 整数
pretty (在查询中): string
resourceVersion (查询参数): 字符串
resourceVersionMatch (查询参数): 字符串
sendInitialEvents (查询参数): 布尔值
timeoutSeconds (查询参数): 整数
watch (查询参数): 布尔值
响应
200 (DaemonSetList): 成功
401: 未授权
list
列出或监视 DaemonSet 类型的对象
HTTP 请求
GET /apis/apps/v1/daemonsets
参数
allowWatchBookmarks (查询参数): 布尔值
continue (查询参数): 字符串
fieldSelector (查询参数): 字符串
labelSelector (查询参数): 字符串
limit (查询参数): 整数
pretty (在查询中): string
resourceVersion (查询参数): 字符串
resourceVersionMatch (查询参数): 字符串
sendInitialEvents (查询参数): 布尔值
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 (查询参数): 字符串
dryRun (查询参数): 字符串
fieldSelector (查询参数): 字符串
gracePeriodSeconds (查询参数): 整数
labelSelector (查询参数): 字符串
limit (查询参数): 整数
pretty (在查询中): string
propagationPolicy (查询参数): 字符串
resourceVersion (查询参数): 字符串
resourceVersionMatch (查询参数): 字符串
sendInitialEvents (查询参数): 布尔值
timeoutSeconds (查询参数): 整数
响应
200 (Status): 成功
401: 未授权
此页面为自动生成。
如果您计划报告此页面的问题,请在您的问题描述中提及此页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。