RuntimeClass
apiVersion: node.k8s.io/v1
import "k8s.io/api/node/v1"
RuntimeClass
RuntimeClass 定义了集群支持的容器运行时类别。RuntimeClass 用于确定哪个容器运行时将用于运行 Pod 中的所有容器。RuntimeClasses 由用户或集群供应程序手动定义,并在 PodSpec 中引用。Kubelet 负责在运行 Pod 之前解析 RuntimeClassName 引用。更多详情,请参阅 https://kubernetes.ac.cn/docs/concepts/containers/runtime-class/
apiVersion: node.k8s.io/v1
kind: RuntimeClass
metadata (ObjectMeta)
更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
handler (string), required
handler 指定了 CRI 实现将使用的底层运行时和配置,用于处理该类别的 Pod。可能的值取决于节点和 CRI 的配置。假定所有 handler 在每个节点上都可用,并且同名 handler 在每个节点上都是等效的。例如,一个名为 "runc" 的 handler 可能指定使用 runc OCI 运行时(使用原生 Linux 容器)来运行 Pod 中的容器。Handler 必须是小写字母,符合 DNS 标签 (RFC 1123) 的要求,并且是不可变的。
overhead (Overhead)
overhead 表示给定 RuntimeClass 运行 Pod 所关联的资源开销。更多详情,请参阅 https://kubernetes.ac.cn/docs/concepts/scheduling-eviction/pod-overhead/
overhead.podFixed (map[string]Quantity)
podFixed 表示运行 Pod 所关联的固定资源开销。
scheduling (Scheduling)
scheduling 包含调度约束,以确保运行此 RuntimeClass 的 Pod 被调度到支持它的节点上。如果 scheduling 为 nil,则假定此 RuntimeClass 被所有节点支持。
Scheduling 指定了支持 RuntimeClass 的节点的调度约束。
scheduling.nodeSelector (map[string]string)
nodeSelector 列出了支持此 RuntimeClass 的节点必须存在的标签。使用此 RuntimeClass 的 Pod 只能调度到与此选择器匹配的节点上。RuntimeClass 的 nodeSelector 将与 Pod 现有的 nodeSelector 合并。任何冲突都会导致 Pod 在准入时被拒绝。
scheduling.tolerations ([]Toleration)
原子性:在合并期间将被替换
tolerations 在准入时被附加到运行此 RuntimeClass 的 Pod 上(排除重复项),有效地合并了 Pod 和 RuntimeClass 所容忍的节点集。
附加此 Toleration 的 Pod 容忍任何符合
匹配运算符的 <key,value,effect> 三元组的污点。 scheduling.tolerations.key (string)
Key 是容忍所适用的污点键。空表示匹配所有污点键。如果键为空,operator 必须是 Exists;此组合表示匹配所有值和所有键。
scheduling.tolerations.operator (string)
Operator 表示键与值的关系。有效操作符是 Exists 和 Equal。默认为 Equal。Exists 等同于值的通配符,以便 Pod 可以容忍特定类别的所有污点。
scheduling.tolerations.value (string)
Value 是容忍匹配的污点值。如果操作符是 Exists,则值应为空,否则为普通字符串。
scheduling.tolerations.effect (string)
Effect 指示匹配的污点效果。空表示匹配所有污点效果。指定时,允许的值为 NoSchedule、PreferNoSchedule 和 NoExecute。
scheduling.tolerations.tolerationSeconds (int64)
TolerationSeconds 表示容忍(必须是 NoExecute 效果,否则忽略此字段)污点的时间段。默认情况下,它未设置,表示永远容忍污点(不驱逐)。零值和负值将被系统视为 0(立即驱逐)。
RuntimeClassList
RuntimeClassList 是 RuntimeClass 对象的列表。
apiVersion: node.k8s.io/v1
kind: RuntimeClassList
metadata (ListMeta)
标准列表元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
items ([]RuntimeClass), required
items 是 schema 对象的列表。
操作
get
读取指定的 RuntimeClass
HTTP 请求
GET /apis/node.k8s.io/v1/runtimeclasses/{name}
参数
name (在路径中): string,必填
RuntimeClass 的名称
pretty (在查询中): string
响应
200 (RuntimeClass): OK
401: 未授权
list
列出或监视 RuntimeClass 类型的对象
HTTP 请求
GET /apis/node.k8s.io/v1/runtimeclasses
参数
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
watch (在查询中): boolean
响应
200 (RuntimeClassList): OK
401: 未授权
create
创建一个 RuntimeClass
HTTP 请求
POST /apis/node.k8s.io/v1/runtimeclasses
参数
body: RuntimeClass, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (RuntimeClass): OK
201 (RuntimeClass): Created
202 (RuntimeClass): Accepted
401: 未授权
update
替换指定的 RuntimeClass
HTTP 请求
PUT /apis/node.k8s.io/v1/runtimeclasses/{name}
参数
name (在路径中): string,必填
RuntimeClass 的名称
body: RuntimeClass, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (RuntimeClass): OK
201 (RuntimeClass): Created
401: 未授权
patch
部分更新指定的 RuntimeClass
HTTP 请求
PATCH /apis/node.k8s.io/v1/runtimeclasses/{name}
参数
name (在路径中): string,必填
RuntimeClass 的名称
body: Patch,必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (RuntimeClass): OK
201 (RuntimeClass): Created
401: 未授权
delete
删除一个 RuntimeClass
HTTP 请求
DELETE /apis/node.k8s.io/v1/runtimeclasses/{name}
参数
name (在路径中): string,必填
RuntimeClass 的名称
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (在查询中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查询中): boolean
pretty (在查询中): string
propagationPolicy (在查询中): string
响应
200 (Status): OK
202 (Status): 已接受
401: 未授权
deletecollection
删除 RuntimeClass 集合
HTTP 请求
DELETE /apis/node.k8s.io/v1/runtimeclasses
参数
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 项目的其他地方进行。