Skip to content

Commit cbe94e3

Browse files
authored
Merge pull request #33446 from kinzhi/kinzhi92
[zh]Update content/zh/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md
2 parents 5bc316b + 463f36b commit cbe94e3

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

content/zh/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The kubelet exports a `Registration` gRPC service:
4040

4141
```gRPC
4242
service Registration {
43-
rpc Register(RegisterRequest) returns (Empty) {}
43+
rpc Register(RegisterRequest) returns (Empty) {}
4444
}
4545
```
4646

@@ -78,16 +78,17 @@ to advertise that the node has 2 "Foo" devices installed and available.
7878
"Foo" 设备并且是可用的。
7979

8080
<!--
81-
Then, users can request devices in a
82-
[Container](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#container-v1-core)
83-
specification as they request other types of resources, with the following limitations:
84-
81+
Then, users can request devices as part of a Pod specification
82+
(see [`container`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container)).
83+
Requesting extended resources is similar to how you manage requests and limits for
84+
other resources, with the following differences:
8585
* Extended resources are only supported as integer resources and cannot be overcommitted.
86-
* Devices cannot be shared among Containers.
86+
* Devices cannot be shared between containers.
8787
-->
88-
然后用户需要请求其他类型的资源的时候,就可以在
89-
[Container](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#container-v1-core)
90-
规范请求这类设备,但是有以下的限制:
88+
然后,用户可以请求设备作为 Pod 规范的一部分,
89+
参见[Container](/zh/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container)
90+
请求扩展资源类似于管理请求和限制的方式,
91+
其他资源,有以下区别:
9192

9293
* 扩展资源仅可作为整数资源使用,并且不能被过量使用
9394
* 设备不能在容器之间共享
@@ -423,7 +424,14 @@ below:
423424
{{< feature-state state="beta" for_k8s_version="v1.23" >}}
424425

425426
<!--
427+
GetAllocatableResources provides information on resources initially available on the worker node.
428+
It provides more information than kubelet exports to APIServer.
429+
-->
430+
端点 `GetAllocatableResources` 提供工作节点上原始可用的资源信息。
431+
此端点所提供的信息比导出给 API 服务器的信息更丰富。
432+
426433
{{< note >}}
434+
<!--
427435
`GetAllocatableResources` should only be used to evaluate [allocatable](/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable)
428436
resources on a node. If the goal is to evaluate free/unallocated resources it should be used in
429437
conjunction with the List() endpoint. The result obtained by `GetAllocatableResources` would remain
@@ -432,9 +440,7 @@ it does (for example: hotplug/hotunplug, device health changes), client is expec
432440
`GetAlloctableResources` endpoint.
433441
However, calling `GetAllocatableResources` endpoint is not sufficient in case of cpu and/or memory
434442
update and Kubelet needs to be restarted to reflect the correct resource capacity and allocatable.
435-
{{< /note >}}
436443
-->
437-
{{< note >}}
438444
`GetAllocatableResources` 应该仅被用于评估一个节点上的[可分配的](/zh/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable)
439445
资源。如果目标是评估空闲/未分配的资源,此调用应该与 List() 端点一起使用。
440446
除非暴露给 kubelet 的底层资源发生变化 否则 `GetAllocatableResources` 得到的结果将保持不变。
@@ -443,12 +449,6 @@ update and Kubelet needs to be restarted to reflect the correct resource capacit
443449
Kubelet 需要重新启动以获取正确的资源容量和可分配的资源。
444450
{{< /note >}}
445451

446-
<!--
447-
GetAllocatableResources provides information on resources initially available on the worker node.
448-
It provides more information than kubelet exports to APIServer.
449-
-->
450-
端点 `GetAllocatableResources` 提供最初在工作节点上可用的资源的信息。
451-
此端点所提供的信息比导出给 API 服务器的信息更丰富。
452452

453453
```gRPC
454454
// AllocatableResourcesResponses 包含 kubelet 所了解到的所有设备的信息
@@ -496,7 +496,7 @@ DaemonSet, `/var/lib/kubelet/pod-resources` must be mounted as a
496496
{{< glossary_tooltip term_id="volume" >}} in the device monitoring agent's
497497
[PodSpec](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podspec-v1-core).
498498
499-
Support for the "PodResourcesLister service" requires `KubeletPodResources` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to be enabled.
499+
Support for the `PodResourcesLister service` requires `KubeletPodResources` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to be enabled.
500500
It is enabled by default starting with Kubernetes 1.15 and is v1 since Kubernetes 1.20.
501501
-->
502502
gRPC 服务通过 `/var/lib/kubelet/pod-resources/kubelet.sock` 的 UNIX 套接字来提供服务。
@@ -597,10 +597,10 @@ Here are some examples of device plugin implementations:
597597
<!--
598598
* Learn about [scheduling GPU resources](/docs/tasks/manage-gpus/scheduling-gpus/) using device plugins
599599
* Learn about [advertising extended resources](/docs/tasks/administer-cluster/extended-resource-node/) on a node
600-
* Read about using [hardware acceleration for TLS ingress](https://kubernetes.io/blog/2019/04/24/hardware-accelerated-ssl/tls-termination-in-ingress-controllers-using-kubernetes-device-plugins-and-runtimeclass/) with Kubernetes
601-
* Learn about the [Topology Manager] (/docs/tasks/adminster-cluster/topology-manager/)
600+
* Learn about the [Topology Manager](/docs/tasks/administer-cluster/topology-manager/)
601+
* Read about using [hardware acceleration for TLS ingress](/blog/2019/04/24/hardware-accelerated-ssl/tls-termination-in-ingress-controllers-using-kubernetes-device-plugins-and-runtimeclass/) with Kubernetes
602602
-->
603603
* 查看[调度 GPU 资源](/zh/docs/tasks/manage-gpus/scheduling-gpus/) 来学习使用设备插件
604604
* 查看在上如何[公布节点上的扩展资源](/zh/docs/tasks/administer-cluster/extended-resource-node/)
605-
* 阅读如何在 Kubernetes 中使用 [TLS Ingress 的硬件加速](https://kubernetes.io/blog/2019/04/24/hardware-accelerated-ssl/tls-termination-in-ingress-controllers-using-kubernetes-device-plugins-and-runtimeclass/)
606605
* 学习[拓扑管理器](/zh/docs/tasks/administer-cluster/topology-manager/)
606+
* 阅读如何在 Kubernetes 中使用 [TLS Ingress 的硬件加速](/zh/blog/2019/04/24/hardware-accelerated-ssl/tls-termination-in-ingress-controllers-using-kubernetes-device-plugins-and-runtimeclass/)

0 commit comments

Comments
 (0)