RuntimeClass
apiVersion: node.k8s.io/v1
import "k8s.io/api/node/v1"
RuntimeClass
RuntimeClass 定义了集群中支持的容器运行时类。RuntimeClass 用于确定用于运行 Pod 中所有容器的容器运行时。RuntimeClass 由用户或集群供应者手动定义,并在 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), 必需
handler 指定 CRI 实现将用于处理此类 Pod 的底层运行时和配置。可能的值特定于节点和 CRI 配置。假设所有处理程序都在每个节点上可用,并且相同名称的处理程序在每个节点上都是等效的。例如,名为“runc”的处理程序可能指定将使用 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 为空,则假设所有节点都支持此 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 是容忍度适用的污点键。空表示匹配所有污点键。如果键为空,则运算符必须为 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), 必需
items 是架构对象的列表。
操作
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, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (RuntimeClass): OK
201 (RuntimeClass): 已创建
202 (RuntimeClass): 已接受
401: 未经授权
update
替换指定的 RuntimeClass
HTTP 请求
PUT /apis/node.k8s.io/v1/runtimeclasses/{name}
参数
name (在路径中): string, 必需
RuntimeClass 的名称
body: RuntimeClass, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (RuntimeClass): OK
201 (RuntimeClass): 已创建
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): 已创建
401: 未经授权
delete
删除一个 RuntimeClass
HTTP 请求
DELETE /apis/node.k8s.io/v1/runtimeclasses/{name}
参数
name (在路径中): string, 必需
RuntimeClass 的名称
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (在查询中): integer
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
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
响应
200 (Status): OK
401: 未经授权
此页面是自动生成的。
如果您打算报告此页面的问题,请在您的问题描述中提及该页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。