From 463f36b1f5de90141b636052abed53557b172640 Mon Sep 17 00:00:00 2001 From: "wei.wang" Date: Wed, 4 May 2022 19:47:53 +0800 Subject: [PATCH] [zh]Update content/zh/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md --- .../compute-storage-net/device-plugins.md | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/content/zh/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md b/content/zh/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md index 13ea71b7e0..7fca9def18 100644 --- a/content/zh/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md +++ b/content/zh/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md @@ -40,7 +40,7 @@ The kubelet exports a `Registration` gRPC service: ```gRPC service Registration { - rpc Register(RegisterRequest) returns (Empty) {} + rpc Register(RegisterRequest) returns (Empty) {} } ``` @@ -78,16 +78,17 @@ to advertise that the node has 2 "Foo" devices installed and available. "Foo" 设备并且是可用的。 -然后用户需要请求其他类型的资源的时候,就可以在 -[Container](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#container-v1-core) -规范请求这类设备,但是有以下的限制: +然后,用户可以请求设备作为 Pod 规范的一部分, +参见[Container](/zh/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container)。 +请求扩展资源类似于管理请求和限制的方式, +其他资源,有以下区别: * 扩展资源仅可作为整数资源使用,并且不能被过量使用 * 设备不能在容器之间共享 @@ -423,7 +424,14 @@ below: {{< feature-state state="beta" for_k8s_version="v1.23" >}} +端点 `GetAllocatableResources` 提供工作节点上原始可用的资源信息。 +此端点所提供的信息比导出给 API 服务器的信息更丰富。 + {{< note >}} + -{{< note >}} `GetAllocatableResources` 应该仅被用于评估一个节点上的[可分配的](/zh/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable) 资源。如果目标是评估空闲/未分配的资源,此调用应该与 List() 端点一起使用。 除非暴露给 kubelet 的底层资源发生变化 否则 `GetAllocatableResources` 得到的结果将保持不变。 @@ -443,12 +449,6 @@ update and Kubelet needs to be restarted to reflect the correct resource capacit Kubelet 需要重新启动以获取正确的资源容量和可分配的资源。 {{< /note >}} - -端点 `GetAllocatableResources` 提供最初在工作节点上可用的资源的信息。 -此端点所提供的信息比导出给 API 服务器的信息更丰富。 ```gRPC // AllocatableResourcesResponses 包含 kubelet 所了解到的所有设备的信息 @@ -496,7 +496,7 @@ DaemonSet, `/var/lib/kubelet/pod-resources` must be mounted as a {{< glossary_tooltip term_id="volume" >}} in the device monitoring agent's [PodSpec](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podspec-v1-core). -Support for the "PodResourcesLister service" requires `KubeletPodResources` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to be enabled. +Support for the `PodResourcesLister service` requires `KubeletPodResources` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to be enabled. It is enabled by default starting with Kubernetes 1.15 and is v1 since Kubernetes 1.20. --> gRPC 服务通过 `/var/lib/kubelet/pod-resources/kubelet.sock` 的 UNIX 套接字来提供服务。 @@ -597,10 +597,10 @@ Here are some examples of device plugin implementations: * 查看[调度 GPU 资源](/zh/docs/tasks/manage-gpus/scheduling-gpus/) 来学习使用设备插件 * 查看在上如何[公布节点上的扩展资源](/zh/docs/tasks/administer-cluster/extended-resource-node/) -* 阅读如何在 Kubernetes 中使用 [TLS Ingress 的硬件加速](https://kubernetes.io/blog/2019/04/24/hardware-accelerated-ssl/tls-termination-in-ingress-controllers-using-kubernetes-device-plugins-and-runtimeclass/) * 学习[拓扑管理器](/zh/docs/tasks/administer-cluster/topology-manager/) +* 阅读如何在 Kubernetes 中使用 [TLS Ingress 的硬件加速](/zh/blog/2019/04/24/hardware-accelerated-ssl/tls-termination-in-ingress-controllers-using-kubernetes-device-plugins-and-runtimeclass/)