@@ -218,12 +218,21 @@ CPU 资源总是设置为资源的绝对数量而非相对数量值。
218
218
{{< note >}}
219
219
<!--
220
220
Kubernetes doesn't allow you to specify CPU resources with a precision finer than
221
- `1m`. Because of this, it's useful to specify CPU units less than `1.0` or `1000m` using
222
- the milliCPU form; for example, `5m` rather than `0.005`.
221
+ `1m` or `0.001` CPU. To avoid accidentally using an invalid CPU quantity, it's useful to specify CPU units using the milliCPU form
222
+ instead of the decimal form when using less than 1 CPU unit.
223
+
224
+ For example, you have a Pod that uses `5m` or `0.005` CPU and would like to decrease
225
+ its CPU resources. By using the decimal form, it's harder to spot that `0.0005` CPU
226
+ is an invalid value, while by using the milliCPU form, it's easier to spot that
227
+ `0.5m` is an invalid value.
223
228
-->
224
- Kubernetes 不允许设置精度小于 ` 1m ` 的 CPU 资源。
225
- 因此,当 CPU 单位小于 ` 1 ` 或 ` 1000m ` 时,使用毫核的形式是有用的;
226
- 例如 ` 5m ` 而不是 ` 0.005 ` 。
229
+ Kubernetes 不允许设置精度小于 ` 1m ` 或 ` 0.001 ` 的 CPU 资源。
230
+ 为了避免意外使用无效的 CPU 数量,当使用少于 1 个 CPU 单元时,使用
231
+ milliCPU 形式而不是十进制形式指定 CPU 单元非常有用。
232
+
233
+ 例如,你有一个使用 ` 5m ` 或 ` 0.005 ` 核 CPU 的 Pod,并且希望减少其 CPU 资源。
234
+ 通过使用十进制形式,更难发现 ` 0.0005 ` CPU 是无效值,而通过使用 milliCPU 形式,
235
+ 更容易发现 ` 0.5m ` 是无效值。
227
236
{{< /note >}}
228
237
229
238
<!--
@@ -1021,14 +1030,14 @@ Cluster-level extended resources are not tied to nodes. They are usually managed
1021
1030
by scheduler extenders, which handle the resource consumption and resource quota.
1022
1031
1023
1032
You can specify the extended resources that are handled by scheduler extenders
1024
- in [scheduler configuration](/docs/reference/config-api/kube-scheduler-config.v1beta3 /)
1033
+ in [scheduler configuration](/docs/reference/config-api/kube-scheduler-config.v1 /)
1025
1034
-->
1026
1035
# ### 集群层面的扩展资源 {#cluster-level-extended-resources}
1027
1036
1028
1037
集群层面的扩展资源并不绑定到具体节点。
1029
1038
它们通常由调度器扩展程序(Scheduler Extenders)管理,这些程序处理资源消耗和资源配额。
1030
1039
1031
- 你可以在[调度器配置](/zh-cn/docs/reference/config-api/kube-scheduler-config.v1beta3 /)
1040
+ 你可以在[调度器配置](/zh-cn/docs/reference/config-api/kube-scheduler-config.v1 /)
1032
1041
中指定由调度器扩展程序处理的扩展资源。
1033
1042
1034
1043
<!--
@@ -1393,13 +1402,13 @@ memory limit (and possibly request) for that container.
1393
1402
* Read how the API reference defines a [container](/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container)
1394
1403
and its [resource requirements](/docs/reference/kubernetes-api/workload-resources/pod-v1/#resources)
1395
1404
* Read about [project quotas](https://www.linux.org/docs/man8/xfs_quota.html) in XFS
1396
- * Read more about the [kube-scheduler configuration reference (v1beta3 )](/docs/reference/config-api/kube-scheduler-config.v1beta3 /)
1405
+ * Read more about the [kube-scheduler configuration reference (v1 )](/docs/reference/config-api/kube-scheduler-config.v1 /)
1397
1406
* Read more about [Quality of Service classes for Pods](/docs/concepts/workloads/pods/pod-qos/)
1398
1407
-->
1399
1408
* 获取[ 分配内存资源给容器和 Pod] ( /zh-cn/docs/tasks/configure-pod-container/assign-memory-resource/ ) 的实践经验
1400
1409
* 获取[ 分配 CPU 资源给容器和 Pod] ( /zh-cn/docs/tasks/configure-pod-container/assign-cpu-resource/ ) 的实践经验
1401
1410
* 阅读 API 参考如何定义[ 容器] ( /zh-cn/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container )
1402
1411
及其[ 资源请求] ( /zh-cn/docs/reference/kubernetes-api/workload-resources/pod-v1/#resources ) 。
1403
1412
* 阅读 XFS 中[ 项目配额] ( https://www.linux.org/docs/man8/xfs_quota.html ) 的文档
1404
- * 进一步阅读 [ kube-scheduler 配置参考 (v1beta3) ] ( /zh-cn/docs/reference/config-api/kube-scheduler-config.v1beta3 / )
1413
+ * 进一步阅读 [ kube-scheduler 配置参考(v1) ] ( /zh-cn/docs/reference/config-api/kube-scheduler-config.v1 / )
1405
1414
* 进一步阅读 [ Pod 的服务质量等级] ( /zh-cn/docs/concepts/workloads/pods/pod-qos/ )
0 commit comments