@@ -19,18 +19,20 @@ title: "RuntimeClass"
1919weight: 9
2020auto_generated: true
2121-->
22+
2223` apiVersion: node.k8s.io/v1 `
2324
2425` import "k8s.io/api/node/v1" `
2526
2627## RuntimeClass {#RuntimeClass}
28+
2729<!--
2830RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/
2931-->
3032RuntimeClass 定义集群中支持的容器运行时类。
3133RuntimeClass 用于确定哪个容器运行时用于运行某 Pod 中的所有容器。
3234RuntimeClass 由用户或集群制备程序手动定义,并在 PodSpec 中引用。
33- Kubelet 负责在运行 Pod 之前解析 RuntimeClassName 引用。
35+ kubelet 负责在运行 Pod 之前解析 RuntimeClassName 引用。
3436有关更多详细信息,请参阅
3537https://kubernetes.io/zh-cn/docs/concepts/containers/runtime-class/
3638
@@ -54,10 +56,10 @@ https://kubernetes.io/zh-cn/docs/concepts/containers/runtime-class/
5456
5557- ** handler** (string),必需
5658
57- handler 指定底层运行时和配置,在 CRI 实现过程中将使用这些运行时和配置来处理这个类的 Pod。
59+ ` handler ` 指定底层运行时和配置,在 CRI 实现过程中将使用这些运行时和配置来处理这个类的 Pod。
5860 可能的值特定于节点和 CRI 配置。
5961 假定所有 handler 可用于每个节点上,且同一名称的 handler 在所有节点上是等效的。
60- 例如,一个名为 “ runc” 的 handler 可能指定 runc OCI 运行时将(使用原生 Linux 容器)
62+ 例如,一个名为 " runc" 的 handler 可能指定 runc OCI 运行时将(使用原生 Linux 容器)
6163 用于运行 Pod 中的容器。该 handler 必须采用小写,遵从 DNS Label (RFC 1123) 要求,且是不可变更的。
6264
6365<!--
@@ -70,7 +72,7 @@ https://kubernetes.io/zh-cn/docs/concepts/containers/runtime-class/
7072-->
7173- ** overhead** (Overhead)
7274
73- overhead 表示运行给定 RuntimeClass 的 Pod 时所关联的资源开销。有关更多详细信息,请参阅
75+ ` overhead ` 表示运行给定 RuntimeClass 的 Pod 时所关联的资源开销。有关更多详细信息,请参阅
7476 https://kubernetes.io/zh-cn/docs/concepts/scheduling-eviction/pod-overhead/
7577
7678 <a name =" Overhead " ></a >
@@ -84,7 +86,7 @@ https://kubernetes.io/zh-cn/docs/concepts/containers/runtime-class/
8486
8587 - ** overhead.podFixed** (map[ string] <a href="{{< ref "../common-definitions/quantity#Quantity" >}}">Quantity</a >)
8688
87- podFixed 表示与运行一个 Pod 所关联的资源开销。
89+ ` podFixed ` 表示与运行一个 Pod 所关联的资源开销。
8890
8991<!--
9092- **scheduling** (Scheduling)
@@ -95,8 +97,9 @@ https://kubernetes.io/zh-cn/docs/concepts/containers/runtime-class/
9597-->
9698- ** scheduling** (Scheduling)
9799
98- scheduling 包含调度约束,这些约束用来确保以这个 RuntimeClass 运行的 Pod 被调度到支持此运行时类的节点。
99- 如果 scheduling 设为空,则假定所有节点支持此 RuntimeClass。
100+ ` scheduling ` 包含调度约束,这些约束用来确保以这个 RuntimeClass 运行的
101+ Pod 被调度到支持此运行时类的节点。
102+ 如果 ` scheduling ` 设为空,则假定所有节点支持此 RuntimeClass。
100103
101104 <a name =" Scheduling " ></a >
102105 ** Scheduling 指定支持 RuntimeClass 的节点的调度约束。**
@@ -108,9 +111,9 @@ https://kubernetes.io/zh-cn/docs/concepts/containers/runtime-class/
108111
109112 - ** scheduling.nodeSelector** (map[ string] string)
110113
111- nodeSelector 列出支持此 RuntimeClass 的节点上必须存在的标签。
114+ ` nodeSelector ` 列出支持此 RuntimeClass 的节点上必须存在的标签。
112115 使用此 RuntimeClass 的 Pod 只能调度到与这个选择算符匹配的节点上。
113- RuntimeClass nodeSelector 与 Pod 现有的 nodeSelector 合并。
116+ RuntimeClass ` nodeSelector ` 与 Pod 现有的 ` nodeSelector ` 合并。
114117 任何冲突均会使得该 Pod 在准入时被拒绝。
115118
116119 <!--
@@ -127,57 +130,82 @@ https://kubernetes.io/zh-cn/docs/concepts/containers/runtime-class/
127130
128131 ** 原子性:将在合并期间被替换**
129132
130- tolerations 在准入期间追加到以此 RuntimeClass 运行的 Pod(不包括重复项)上,
133+ ` tolerations ` 在准入期间追加到以此 RuntimeClass 运行的 Pod(不包括重复项)上,
131134 本质上是求取 Pod 和 RuntimeClass 所容忍的节点并集。
132135
133136 <a name =" Toleration " ></a >
134137 ** 附加此容忍度的 Pod 将容忍用匹配运算符 ` operator ` 运算后与三元组
135- ` <key,value,effect> ` 匹配的任何污点 。**
138+ ` <key,value,effect> ` 匹配的任意污点 。**
136139
137140 <!--
138141 - **scheduling.tolerations.key** (string)
139142 Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.
140143
141144 - **scheduling.tolerations.operator** (string)
142145 Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.
146+
147+ Possible enum values:
148+ - `"Equal"`
149+ - `"Exists"
143150 -->
144151
145152 - ** scheduling.tolerations.key** (string)
146153
147- key 是容忍度所应用到的污点键。空意味着匹配所有污点键。
148- 如果键为空,则运算符必须为 Exists;这个组合意味着匹配所有值和所有键。
154+ ` key ` 是容忍度所应用到的污点键。空意味着匹配所有污点键。
155+ 如果键为空,则运算符必须为 ` Exists ` ;这个组合意味着匹配所有值和所有键。
149156
150157 - ** scheduling.tolerations.operator** (string)
151158
152- operator 表示一个键与值的关系。有效的运算符为 Exists 和 Equal。默认为 Equal。
153- Exists 等价于将值设置为通配符的情况,因此一个 Pod 可以容忍特定类别的所有污点。
159+ ` operator ` 表示一个键与值的关系。有效的运算符为 ` Exists ` 和 ` Equal ` 。默认为 ` Equal ` 。
160+ ` Exists ` 等价于将值设置为通配符的情况,因此一个 Pod 可以容忍特定类别的所有污点。
161+
162+ 可能的枚举值:
163+
164+ - ` "Equal" `
165+ - ` "Exists" `
154166
155167 <!--
156168 - **scheduling.tolerations.value** (string)
157169 Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.
158170
159171 - **scheduling.tolerations.effect** (string)
160172 Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
173+
174+ Possible enum values:
175+ - `"NoExecute"` Evict any already-running pods that do not tolerate the taint. Currently enforced by NodeController.
176+ - `"NoSchedule"` Do not allow new pods to schedule onto the node unless they tolerate the taint, but allow all pods submitted to Kubelet without going through the scheduler to start, and allow all already-running pods to continue running. Enforced by the scheduler.
177+ - `"PreferNoSchedule"` Like TaintEffectNoSchedule, but the scheduler tries not to schedule new pods onto the node, rather than prohibiting new pods from scheduling onto the node entirely. Enforced by the scheduler.
161178
162179 - **scheduling.tolerations.tolerationSeconds** (int64)
163180 TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.
164181 -->
165182
166183 - ** scheduling.tolerations.value** (string)
167184
168- value 是容忍度匹配到的污点值。如果运算符为 Exists,则值应为空,否则就是一个普通字符串。
185+ ` value ` 是容忍度匹配到的污点值。如果运算符为 ` Exists ` ,则值应为空,否则就是一个普通字符串。
169186
170187 - ** scheduling.tolerations.effect** (string)
171188
172- effect 表示匹配度污点效果。空意味着匹配所有污点效果。
173- 当指定值时,允许的值为 NoSchedule、PreferNoSchedule 或 NoExecute。
189+ ` effect ` 表示匹配度污点效果。空意味着匹配所有污点效果。
190+ 当指定值时,允许的值为 ` NoSchedule ` 、` PreferNoSchedule ` 或 ` NoExecute ` 。
191+
192+ 可能的枚举值:
193+
194+ - ` "NoExecute" ` 驱逐已经在运行且不容忍污点的所有 Pod。
195+ 当前由 NodeController 执行。
196+ - ` "NoSchedule" ` 不允许新的 Pod 调度到该节点上,除非它们容忍此污点,
197+ 但允许所有直接提交给 kubelet 而不经过调度器的 Pod 启动,
198+ 并允许所有已经在运行的 Pod 继续运行。由调度器执行。
199+ - ` "PreferNoSchedule" ` 类似于 ` NoSchedule ` ,但是调度器尝试避免将新 Pod
200+ 调度到该节点上,而不是完全禁止新 Pod 调度到节点。由调度器执行。
174201
175202 - ** scheduling.tolerations.tolerationSeconds** (int64)
176203
177- tolerationSeconds 表示容忍度容忍污点的时间段(必须是 NoExecute 的效果,否则忽略此字段)。
204+ ` tolerationSeconds ` 表示容忍度容忍污点的时间段(必须是 NoExecute 的效果,否则忽略此字段)。
178205 默认情况下,不设置此字段,这意味着永远容忍污点(不驱逐)。零和负值将被系统视为 0(立即驱逐)。
179206
180207## RuntimeClassList {#RuntimeClassList}
208+
181209<!--
182210RuntimeClassList is a list of RuntimeClass objects.
183211-->
@@ -203,18 +231,21 @@ RuntimeClassList 是 RuntimeClass 对象的列表。
203231
204232- ** items** ([ ] <a href="{{< ref "../cluster-resources/runtime-class-v1#RuntimeClass" >}}">RuntimeClass</a >),必需
205233
206- items 是 schema 对象的列表。
234+ ` items ` 是 schema 对象的列表。
207235
208236<!--
209237## Operations {#Operations}
210238### `get` read the specified RuntimeClass
211239#### HTTP Request
212240-->
213241## 操作 {#Operations}
242+
214243<hr >
215244
216245### ` get ` 读取指定的 RuntimeClass
246+
217247#### HTTP 请求
248+
218249GET /apis/node.k8s.io/v1/runtimeclasses/{name}
219250
220251<!--
@@ -224,9 +255,10 @@ GET /apis/node.k8s.io/v1/runtimeclasses/{name}
224255- **pretty** (*in query*): string
225256-->
226257##### 参数
258+
227259- ** name** (** 路径参数** ): string,必需
228260
229- RuntimeClass 的名称
261+ RuntimeClass 的名称。
230262
231263- ** pretty** (** 查询参数** ): string
232264
@@ -236,6 +268,7 @@ GET /apis/node.k8s.io/v1/runtimeclasses/{name}
236268#### Response
237269-->
238270#### 响应
271+
239272200 (<a href="{{< ref "../cluster-resources/runtime-class-v1#RuntimeClass" >}}">RuntimeClass</a >): OK
240273
241274401: Unauthorized
@@ -245,7 +278,9 @@ GET /apis/node.k8s.io/v1/runtimeclasses/{name}
245278#### HTTP Request
246279-->
247280### ` list ` 列出或监视 RuntimeClass 类别的对象
281+
248282#### HTTP 请求
283+
249284GET /apis/node.k8s.io/v1/runtimeclasses
250285
251286<!--
@@ -263,6 +298,7 @@ GET /apis/node.k8s.io/v1/runtimeclasses
263298- **watch** (*in query*): boolean
264299-->
265300##### 参数
301+
266302- ** allowWatchBookmarks** (** 查询参数** ): boolean
267303
268304 <a href="{{< ref "../common-parameters/common-parameters#allowWatchBookmarks" >}}">allowWatchBookmarks</a >
@@ -311,6 +347,7 @@ GET /apis/node.k8s.io/v1/runtimeclasses
311347#### Response
312348-->
313349#### 响应
350+
314351200 (<a href="{{< ref "../cluster-resources/runtime-class-v1#RuntimeClassList" >}}">RuntimeClassList</a >): OK
315352
316353401: Unauthorized
@@ -320,8 +357,11 @@ GET /apis/node.k8s.io/v1/runtimeclasses
320357#### HTTP Request
321358-->
322359### ` create ` 创建 RuntimeClass
360+
323361#### HTTP 请求
362+
324363POST /apis/node.k8s.io/v1/runtimeclasses
364+
325365<!--
326366#### Parameters
327367- **body**: <a href="{{< ref "../cluster-resources/runtime-class-v1#RuntimeClass" >}}">RuntimeClass</a>, required
@@ -331,6 +371,7 @@ POST /apis/node.k8s.io/v1/runtimeclasses
331371- **pretty** (*in query*): string
332372-->
333373##### 参数
374+
334375- ** body** : <a href="{{< ref "../cluster-resources/runtime-class-v1#RuntimeClass" >}}">RuntimeClass</a >,必需
335376
336377- ** dryRun** (** 查询参数** ): string
@@ -353,6 +394,7 @@ POST /apis/node.k8s.io/v1/runtimeclasses
353394#### Response
354395-->
355396#### 响应
397+
356398200 (<a href="{{< ref "../cluster-resources/runtime-class-v1#RuntimeClass" >}}">RuntimeClass</a >): OK
357399
358400201 (<a href="{{< ref "../cluster-resources/runtime-class-v1#RuntimeClass" >}}">RuntimeClass</a >): Created
@@ -366,7 +408,9 @@ POST /apis/node.k8s.io/v1/runtimeclasses
366408#### HTTP Request
367409-->
368410### ` update ` 替换指定的 RuntimeClass
411+
369412#### HTTP 请求
413+
370414PUT /apis/node.k8s.io/v1/runtimeclasses/{name}
371415
372416<!--
@@ -380,6 +424,7 @@ PUT /apis/node.k8s.io/v1/runtimeclasses/{name}
380424- **pretty** (*in query*): string
381425-->
382426##### 参数
427+
383428- ** name** (** 路径参数** ): string,必需
384429
385430 RuntimeClass 的名称
@@ -406,6 +451,7 @@ PUT /apis/node.k8s.io/v1/runtimeclasses/{name}
406451#### Response
407452-->
408453#### 响应
454+
409455200 (<a href="{{< ref "../cluster-resources/runtime-class-v1#RuntimeClass" >}}">RuntimeClass</a >): OK
410456
411457201 (<a href="{{< ref "../cluster-resources/runtime-class-v1#RuntimeClass" >}}">RuntimeClass</a >): Created
@@ -417,7 +463,9 @@ PUT /apis/node.k8s.io/v1/runtimeclasses/{name}
417463#### HTTP Request
418464-->
419465### ` patch ` 部分更新指定的 RuntimeClass
466+
420467#### HTTP 请求
468+
421469PATCH /apis/node.k8s.io/v1/runtimeclasses/{name}
422470
423471<!--
@@ -432,6 +480,7 @@ PATCH /apis/node.k8s.io/v1/runtimeclasses/{name}
432480- **pretty** (*in query*): string
433481-->
434482##### 参数
483+
435484- ** name** (** 路径参数** ): string,必需
436485
437486 RuntimeClass 的名称
@@ -462,6 +511,7 @@ PATCH /apis/node.k8s.io/v1/runtimeclasses/{name}
462511#### Response
463512-->
464513#### 响应
514+
465515200 (<a href="{{< ref "../cluster-resources/runtime-class-v1#RuntimeClass" >}}">RuntimeClass</a >): OK
466516
467517201 (<a href="{{< ref "../cluster-resources/runtime-class-v1#RuntimeClass" >}}">RuntimeClass</a >): Created
@@ -473,7 +523,9 @@ PATCH /apis/node.k8s.io/v1/runtimeclasses/{name}
473523#### HTTP Request
474524-->
475525### ` delete ` 删除 RuntimeClass
526+
476527#### HTTP 请求
528+
477529DELETE /apis/node.k8s.io/v1/runtimeclasses/{name}
478530
479531<!--
@@ -488,6 +540,7 @@ DELETE /apis/node.k8s.io/v1/runtimeclasses/{name}
488540- **propagationPolicy** (*in query*): string
489541-->
490542##### 参数
543+
491544- ** name** (** 路径参数** ): string,必需
492545
493546 RuntimeClass 的名称
@@ -518,6 +571,7 @@ DELETE /apis/node.k8s.io/v1/runtimeclasses/{name}
518571#### Response
519572-->
520573#### 响应
574+
521575200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status</a >): OK
522576
523577202 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status</a >): Accepted
@@ -529,7 +583,9 @@ DELETE /apis/node.k8s.io/v1/runtimeclasses/{name}
529583#### HTTP Request
530584-->
531585### ` deletecollection ` 删除 RuntimeClass 的集合
586+
532587#### HTTP 请求
588+
533589DELETE /apis/node.k8s.io/v1/runtimeclasses
534590
535591<!--
@@ -550,6 +606,7 @@ DELETE /apis/node.k8s.io/v1/runtimeclasses
550606- **timeoutSeconds** (*in query*): integer
551607-->
552608##### 参数
609+
553610- ** body** : <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions</a >
554611
555612- ** continue** (** 查询参数** ): string
@@ -608,6 +665,7 @@ DELETE /apis/node.k8s.io/v1/runtimeclasses
608665#### Response
609666-->
610667#### 响应
668+
611669200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status</a >): OK
612670
613671401: Unauthorized
0 commit comments