Skip to content

Commit a6ca029

Browse files
authored
Merge pull request #40630 from asa3311/sync-dynamic-resource-allocation.md
[zh-cn] sync 1.27 dynamic-resource-allocation.md
2 parents 1f5b1f6 + ac0dd6b commit a6ca029

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

content/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ weight: 65
1414

1515
<!-- overview -->
1616

17-
{{< feature-state for_k8s_version="v1.26" state="alpha" >}}
17+
{{< feature-state for_k8s_version="v1.27" state="alpha" >}}
1818

1919
<!--
2020
Dynamic resource allocation is a new API for requesting and sharing resources
@@ -48,10 +48,10 @@ Kubernetes v{{< skew currentVersion >}} 包含用于动态资源分配的集群
4848

4949
## API {#api}
5050
<!--
51-
The new `resource.k8s.io/v1alpha1` {{< glossary_tooltip text="API group"
51+
The `resource.k8s.io/v1alpha2` {{< glossary_tooltip text="API group"
5252
term_id="api-group" >}} provides four new types:
5353
-->
54-
新的 `resource.k8s.io/v1alpha1`
54+
`resource.k8s.io/v1alpha2`
5555
{{< glossary_tooltip text="API 组" term_id="api-group" >}}提供四种新类型:
5656

5757
<!--
@@ -72,7 +72,7 @@ ResourceClaimTemplate
7272
: Defines the spec and some meta data for creating
7373
ResourceClaims. Created by a user when deploying a workload.
7474
75-
PodScheduling
75+
PodSchedulingContext
7676
: Used internally by the control plane and resource drivers
7777
to coordinate pod scheduling when ResourceClaims need to be allocated
7878
for a Pod.
@@ -91,7 +91,7 @@ ResourceClaimTemplate
9191
: 定义用于创建 ResourceClaim 的 spec 和一些元数据。
9292
部署工作负载时由用户创建。
9393

94-
PodScheduling
94+
PodSchedulingContext
9595
: 供控制平面和资源驱动程序内部使用,
9696
在需要为 Pod 分配 ResourceClaim 时协调 Pod 调度。
9797

@@ -134,7 +134,7 @@ will get created for this Pod and each container gets access to one of them.
134134
该示例将为此 Pod 创建两个 ResourceClaim 对象,每个容器都可以访问其中一个。
135135

136136
```yaml
137-
apiVersion: resource.k8s.io/v1alpha1
137+
apiVersion: resource.k8s.io/v1alpha2
138138
kind: ResourceClass
139139
name: resource.example.com
140140
driverName: resource-driver.example.com
@@ -146,7 +146,7 @@ spec:
146146
color: black
147147
size: large
148148
---
149-
apiVersion: resource.k8s.io/v1alpha1
149+
apiVersion: resource.k8s.io/v1alpha2
150150
kind: ResourceClaimTemplate
151151
metadata:
152152
name: large-black-cat-claim-template
@@ -252,6 +252,19 @@ set aside for it.
252252
这避免了 Pod 被调度到一个节点但无法在那里运行的情况,
253253
这种情况很糟糕,因为被挂起 Pod 也会阻塞为其保留的其他资源,如 RAM 或 CPU。
254254
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+
255268
<!--
256269
## Limitations
257270
-->
@@ -279,7 +292,7 @@ future.
279292
Dynamic resource allocation is an *alpha feature* and only enabled when the
280293
`DynamicResourceAllocation` [feature
281294
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"
283296
term_id="api-group" >}} are enabled. For details on that, see the
284297
`--feature-gates` and `--runtime-config` [kube-apiserver
285298
parameters](/docs/reference/command-line-tools-reference/kube-apiserver/).
@@ -322,10 +335,11 @@ error: the server doesn't have a resource type "resourceclasses"
322335
323336
<!--
324337
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.
327341
-->
328-
kube-scheduler 的默认配置仅在启用特性门控时才启用 "DynamicResources" 插件。
342+
kube-scheduler 的默认配置仅在启用特性门控且使用 v1 配置 API 时才启用 "DynamicResources" 插件。
329343
自定义配置可能需要被修改才能启用它。
330344
331345
<!--

0 commit comments

Comments
 (0)