Skip to content

Commit 8d3a27d

Browse files
committed
[zh-cn] sync manage-resources-containers.md secret.md
Signed-off-by: xin.li <[email protected]>
1 parent bcbd218 commit 8d3a27d

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

content/zh-cn/docs/concepts/configuration/manage-resources-containers.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,21 @@ CPU 资源总是设置为资源的绝对数量而非相对数量值。
218218
{{< note >}}
219219
<!--
220220
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.
223228
-->
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` 是无效值。
227236
{{< /note >}}
228237

229238
<!--
@@ -1021,14 +1030,14 @@ Cluster-level extended resources are not tied to nodes. They are usually managed
10211030
by scheduler extenders, which handle the resource consumption and resource quota.
10221031

10231032
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/)
10251034
-->
10261035
#### 集群层面的扩展资源 {#cluster-level-extended-resources}
10271036

10281037
集群层面的扩展资源并不绑定到具体节点。
10291038
它们通常由调度器扩展程序(Scheduler Extenders)管理,这些程序处理资源消耗和资源配额。
10301039

1031-
你可以在[调度器配置](/zh-cn/docs/reference/config-api/kube-scheduler-config.v1beta3/)
1040+
你可以在[调度器配置](/zh-cn/docs/reference/config-api/kube-scheduler-config.v1/)
10321041
中指定由调度器扩展程序处理的扩展资源。
10331042

10341043
<!--
@@ -1393,13 +1402,13 @@ memory limit (and possibly request) for that container.
13931402
* Read how the API reference defines a [container](/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container)
13941403
and its [resource requirements](/docs/reference/kubernetes-api/workload-resources/pod-v1/#resources)
13951404
* 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/)
13971406
* Read more about [Quality of Service classes for Pods](/docs/concepts/workloads/pods/pod-qos/)
13981407
-->
13991408
* 获取[分配内存资源给容器和 Pod](/zh-cn/docs/tasks/configure-pod-container/assign-memory-resource/) 的实践经验
14001409
* 获取[分配 CPU 资源给容器和 Pod](/zh-cn/docs/tasks/configure-pod-container/assign-cpu-resource/) 的实践经验
14011410
* 阅读 API 参考如何定义[容器](/zh-cn/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container)
14021411
及其[资源请求](/zh-cn/docs/reference/kubernetes-api/workload-resources/pod-v1/#resources)
14031412
* 阅读 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/)
14051414
* 进一步阅读 [Pod 的服务质量等级](/zh-cn/docs/concepts/workloads/pods/pod-qos/)

content/zh-cn/docs/concepts/configuration/secret.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,12 +398,12 @@ You should only create a ServiceAccount token Secret
398398
if you can't use the `TokenRequest` API to obtain a token,
399399
and the security exposure of persisting a non-expiring token credential
400400
in a readable API object is acceptable to you. For instructions, see
401-
[Manually create a long-lived API token for a ServiceAccount](/docs/tasks/configure-pod-container/configure-service-account/#manually-create-a-service-account-api-token).
401+
[Manually create a long-lived API token for a ServiceAccount](/docs/tasks/configure-pod-container/configure-service-account/#manually-create-an-api-token-for-a-serviceaccount).
402402
-->
403403
只有在你无法使用 `TokenRequest` API 来获取令牌,
404404
并且你能够接受因为将永不过期的令牌凭据写入到可读取的 API 对象而带来的安全风险时,
405405
才应该创建 ServiceAccount 令牌 Secret。
406-
更多细节参阅[为 ServiceAccount 手动创建长期有效的 API 令牌](/zh-cn/docs/tasks/configure-pod-container/configure-service-account/#manually-create-a-service-account-api-token)
406+
更多细节参阅[为 ServiceAccount 手动创建长期有效的 API 令牌](/zh-cn/docs/tasks/configure-pod-container/configure-service-account/#manually-create-an-api-token-for-a-serviceaccount)
407407
{{< /note >}}
408408

409409
<!--

0 commit comments

Comments
 (0)