@@ -86,7 +86,7 @@ other resources, with the following differences:
86
86
* Devices cannot be shared between containers.
87
87
-->
88
88
然后,用户可以请求设备作为 Pod 规范的一部分,
89
- 参见[ Container] ( /zh-cn/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container ) 。
89
+ 参见 [ Container] ( /zh-cn/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container ) 。
90
90
请求扩展资源类似于管理请求和限制的方式,
91
91
其他资源,有以下区别:
92
92
@@ -334,7 +334,7 @@ kubelet 提供了 gRPC 服务来使得正在使用中的设备被发现,并且
334
334
335
335
``` gRPC
336
336
// PodResourcesLister 是一个由 kubelet 提供的服务,用来提供供节点上
337
- // Pods 和容器使用的节点资源的信息
337
+ // Pod 和容器使用的节点资源的信息
338
338
service PodResourcesLister {
339
339
rpc List(ListPodResourcesRequest) returns (ListPodResourcesResponse) {}
340
340
rpc GetAllocatableResources(AllocatableResourcesRequest) returns (AllocatableResourcesResponse) {}
@@ -349,7 +349,7 @@ id of exclusively allocated CPUs, device id as it was reported by device plugins
349
349
the NUMA node where these devices are allocated. Also, for NUMA-based machines, it contains
350
350
the information about memory and hugepages reserved for a container.
351
351
-->
352
- 这一 ` List ` 端点提供运行中 Pods 的资源信息,包括类似独占式分配的
352
+ 这一 ` List ` 端点提供运行中 Pod 的资源信息,包括类似独占式分配的
353
353
CPU ID、设备插件所报告的设备 ID 以及这些设备分配所处的 NUMA 节点 ID。
354
354
此外,对于基于 NUMA 的机器,它还会包含为容器保留的内存和大页的信息。
355
355
@@ -414,7 +414,7 @@ below:
414
414
` List ` 端点中的 ` ContainerResources ` 中的 cpu_ids 对应于分配给某个容器的专属 CPU。
415
415
如果要统计共享池中的 CPU,` List ` 端点需要与 ` GetAllocatableResources ` 端点一起使用,如下所述:
416
416
417
- 1 . 调用 ` GetAllocatableResources ` 获取所有可用的 CPUs 。
417
+ 1 . 调用 ` GetAllocatableResources ` 获取所有可用的 CPU 。
418
418
2 . 在系统中所有的 ` ContainerResources ` 上调用 ` GetCpuIds ` 。
419
419
3 . 用 ` GetAllocatableResources ` 获取的 CPU 数减去 ` GetCpuIds ` 获取的 CPU 数。
420
420
{{< /note >}}
@@ -441,9 +441,9 @@ it does (for example: hotplug/hotunplug, device health changes), client is expec
441
441
However, calling `GetAllocatableResources` endpoint is not sufficient in case of cpu and/or memory
442
442
update and Kubelet needs to be restarted to reflect the correct resource capacity and allocatable.
443
443
-->
444
- ` GetAllocatableResources ` 应该仅被用于评估一个节点上的[ 可分配的] ( /zh-cn/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable )
445
- 资源。 如果目标是评估空闲/未分配的资源,此调用应该与 List() 端点一起使用。
446
- 除非暴露给 kubelet 的底层资源发生变化 否则 ` GetAllocatableResources ` 得到的结果将保持不变。
444
+ ` GetAllocatableResources ` 应该仅被用于评估一个节点上的[ 可分配的] ( /zh-cn/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable ) 资源。
445
+ 如果目标是评估空闲/未分配的资源,此调用应该与 List() 端点一起使用。
446
+ 除非暴露给 kubelet 的底层资源发生变化, 否则 ` GetAllocatableResources ` 得到的结果将保持不变。
447
447
这种情况很少发生,但当发生时(例如:热插拔,设备健康状况改变),客户端应该调用 ` GetAlloctableResources ` 端点。
448
448
然而,调用 ` GetAllocatableResources ` 端点在 cpu、内存被更新的情况下是不够的,
449
449
Kubelet 需要重新启动以获取正确的资源容量和可分配的资源。
@@ -471,7 +471,7 @@ Preceding Kubernetes v1.23, to enable this feature `kubelet` must be started wit
471
471
-->
472
472
从 Kubernetes v1.23 开始,` GetAllocatableResources ` 被默认启用。
473
473
你可以通过关闭 ` KubeletPodResourcesGetAllocatable `
474
- [ 特性门控] ( /zh-cn/docs/reference/command-line-tools-reference/feature-gates/ ) 来禁用。
474
+ [ 特性门控] ( /zh-cn/docs/reference/command-line-tools-reference/feature-gates/ ) 来禁用。
475
475
476
476
在 Kubernetes v1.23 之前,要启用这一功能,` kubelet ` 必须用以下标志启动:
477
477
@@ -508,7 +508,7 @@ gRPC 服务通过 `/var/lib/kubelet/pod-resources/kubelet.sock` 的 UNIX 套接
508
508
中声明将 ` /var/lib/kubelet/pod-resources ` 目录以
509
509
{{< glossary_tooltip text="卷" term_id="volume" >}}的形式被挂载到设备监控代理中。
510
510
511
- 对“PodResourcesLister 服务”的支持要求启用 ` KubeletPodResources `
511
+ 对 “PodResourcesLister 服务”的支持要求启用 ` KubeletPodResources `
512
512
[ 特性门控] ( /zh-cn/docs/reference/command-line-tools-reference/feature-gates/ ) 。
513
513
从 Kubernetes 1.15 开始默认启用,自从 Kubernetes 1.20 开始为 v1。
514
514
0 commit comments