@@ -14,7 +14,7 @@ weight: 65
14
14
15
15
<!-- overview -->
16
16
17
- {{< feature-state for_k8s_version="v1.26 " state="alpha" >}}
17
+ {{< feature-state for_k8s_version="v1.27 " state="alpha" >}}
18
18
19
19
<!--
20
20
Dynamic resource allocation is a new API for requesting and sharing resources
@@ -48,10 +48,10 @@ Kubernetes v{{< skew currentVersion >}} 包含用于动态资源分配的集群
48
48
49
49
## API {#api}
50
50
<!--
51
- The new `resource.k8s.io/v1alpha1 ` {{< glossary_tooltip text="API group"
51
+ The `resource.k8s.io/v1alpha2 ` {{< glossary_tooltip text="API group"
52
52
term_id="api-group" >}} provides four new types:
53
53
-->
54
- 新的 ` resource.k8s.io/v1alpha1 `
54
+ ` resource.k8s.io/v1alpha2 `
55
55
{{< glossary_tooltip text="API 组" term_id="api-group" >}}提供四种新类型:
56
56
57
57
<!--
@@ -72,7 +72,7 @@ ResourceClaimTemplate
72
72
: Defines the spec and some meta data for creating
73
73
ResourceClaims. Created by a user when deploying a workload.
74
74
75
- PodScheduling
75
+ PodSchedulingContext
76
76
: Used internally by the control plane and resource drivers
77
77
to coordinate pod scheduling when ResourceClaims need to be allocated
78
78
for a Pod.
@@ -91,7 +91,7 @@ ResourceClaimTemplate
91
91
: 定义用于创建 ResourceClaim 的 spec 和一些元数据。
92
92
部署工作负载时由用户创建。
93
93
94
- PodScheduling
94
+ PodSchedulingContext
95
95
: 供控制平面和资源驱动程序内部使用,
96
96
在需要为 Pod 分配 ResourceClaim 时协调 Pod 调度。
97
97
@@ -134,7 +134,7 @@ will get created for this Pod and each container gets access to one of them.
134
134
该示例将为此 Pod 创建两个 ResourceClaim 对象,每个容器都可以访问其中一个。
135
135
136
136
``` yaml
137
- apiVersion : resource.k8s.io/v1alpha1
137
+ apiVersion : resource.k8s.io/v1alpha2
138
138
kind : ResourceClass
139
139
name : resource.example.com
140
140
driverName : resource-driver.example.com
@@ -146,7 +146,7 @@ spec:
146
146
color : black
147
147
size : large
148
148
---
149
- apiVersion : resource.k8s.io/v1alpha1
149
+ apiVersion : resource.k8s.io/v1alpha2
150
150
kind : ResourceClaimTemplate
151
151
metadata :
152
152
name : large-black-cat-claim-template
@@ -252,6 +252,19 @@ set aside for it.
252
252
这避免了 Pod 被调度到一个节点但无法在那里运行的情况,
253
253
这种情况很糟糕,因为被挂起 Pod 也会阻塞为其保留的其他资源,如 RAM 或 CPU。
254
254
255
+ <!--
256
+ ## Monitoring resources
257
+ -->
258
+ ## 监控资源 {#monitoring-resources}
259
+
260
+ <!--
261
+ The kubelet provides a gRPC service to enable discovery of dynamic resources of
262
+ running Pods. For more information on the gRPC endpoints, see the
263
+ [resource allocation reporting](/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#monitoring-device-plugin-resources).
264
+ -->
265
+ kubelet 提供了一个 gRPC 服务,以便发现正在运行的 Pod 的动态资源。
266
+ 有关 gRPC 端点的更多信息,请参阅[资源分配报告](/zh-cn/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#monitoring-device-plugin-resources)。
267
+
255
268
<!--
256
269
## Limitations
257
270
-->
@@ -279,7 +292,7 @@ future.
279
292
Dynamic resource allocation is an *alpha feature* and only enabled when the
280
293
` DynamicResourceAllocation` [feature
281
294
gate](/docs/reference/command-line-tools-reference/feature-gates/) and the
282
- ` resource.k8s.io/v1alpha1 ` {{< glossary_tooltip text="API group"
295
+ ` resource.k8s.io/v1alpha2 ` {{< glossary_tooltip text="API group"
283
296
term_id="api-group" >}} are enabled. For details on that, see the
284
297
` --feature-gates` and `--runtime-config` [kube-apiserver
285
298
parameters](/docs/reference/command-line-tools-reference/kube-apiserver/).
@@ -322,10 +335,11 @@ error: the server doesn't have a resource type "resourceclasses"
322
335
323
336
<!--
324
337
The default configuration of kube-scheduler enables the "DynamicResources"
325
- plugin if and only if the feature gate is enabled. Custom configurations may
326
- have to be modified to include it.
338
+ plugin if and only if the feature gate is enabled and when using
339
+ the v1 configuration API. Custom configurations may have to be modified to
340
+ include it.
327
341
-->
328
- kube-scheduler 的默认配置仅在启用特性门控时才启用 "DynamicResources" 插件。
342
+ kube-scheduler 的默认配置仅在启用特性门控且使用 v1 配置 API 时才启用 "DynamicResources" 插件。
329
343
自定义配置可能需要被修改才能启用它。
330
344
331
345
<!--
0 commit comments