Skip to content

Commit c5cc7f3

Browse files
author
zhuzhenghao
committed
[zh] Resync assign-cpu-resource
1 parent 237fdab commit c5cc7f3

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

content/zh-cn/docs/tasks/configure-pod-container/assign-cpu-resource.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ allocated as much CPU as it requests.
2727
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
2828

2929
<!--
30-
Each node in your cluster must have at least 1 CPU.
30+
Your cluster must have at least 1 CPU available for use to run the task examples.
3131
3232
A few of the steps on this page require you to run the
3333
[metrics-server](https://github.com/kubernetes-sigs/metrics-server)
@@ -37,7 +37,7 @@ running, you can skip those steps.
3737
If you are running {{< glossary_tooltip term_id="minikube" >}}, run the
3838
following command to enable metrics-server:
3939
-->
40-
集群中的每个节点必须至少有 1 个 CPU 可用才能运行本任务中的示例。
40+
你的集群必须至少有 1 个 CPU 可用才能运行本任务中的示例。
4141

4242
本页的一些步骤要求你在集群中运行
4343
[metrics-server](https://github.com/kubernetes-sigs/metrics-server)
@@ -61,7 +61,7 @@ kubectl get apiservices
6161
```
6262

6363
<!--
64-
If the resource metrics API is available, the output will include a
64+
If the resource metrics API is available, the output will include a
6565
reference to `metrics.k8s.io`.
6666
-->
6767
如果资源指标 API 可用,则会输出将包含一个对 `metrics.k8s.io` 的引用。
@@ -124,7 +124,7 @@ kubectl apply -f https://k8s.io/examples/pods/resource/cpu-request-limit.yaml --
124124
```
125125

126126
<!--
127-
Verify that the Pod is running:
127+
Verify that the Pod is running:
128128
-->
129129
验证所创建的 Pod 处于 Running 状态
130130

@@ -182,15 +182,13 @@ Recall that by setting `-cpu "2"`, you configured the Container to attempt to us
182182
但是容器只被允许使用大约 1 个 CPU。
183183
容器的 CPU 用量受到限制,因为该容器正尝试使用超出其限制的 CPU 资源。
184184
185+
{{< note >}}
185186
<!--
186187
Another possible explanation for the CPU use being below 1.0 is that the Node might not have
187-
enough CPU resources available. Recall that the prerequisites for this exercise require each of
188-
your Nodes to have at least 1 CPU. If your Container runs on a Node that has only 1 CPU, the Container
189-
cannot use more than 1 CPU regardless of the CPU limit specified for the Container.
188+
enough CPU resources available. Recall that the prerequisites for this exercise require your cluster to have at least 1 CPU available for use. If your Container runs on a Node that has only 1 CPU, the Container cannot use more than 1 CPU regardless of the CPU limit specified for the Container.
190189
-->
191-
{{< note >}}
192190
CPU 使用率低于 1.0 的另一种可能的解释是,节点可能没有足够的 CPU 资源可用。
193-
回想一下,此练习的先决条件需要你的节点至少具有 1 个 CPU 可用。
191+
回想一下,此练习的先决条件需要你的集群至少具有 1 个 CPU 可用。
194192
如果你的容器在只有 1 个 CPU 的节点上运行,则容器无论为容器指定的 CPU 限制如何,
195193
都不能使用超过 1 个 CPU。
196194
{{< /note >}}
@@ -276,7 +274,7 @@ Pod 调度是基于资源请求值来进行的。
276274
kubectl apply -f https://k8s.io/examples/pods/resource/cpu-request-limit-2.yaml --namespace=cpu-example
277275
```
278276
<!--
279-
View the Pod status:
277+
View the Pod status:
280278
-->
281279
查看该 Pod 的状态:
282280

@@ -420,20 +418,19 @@ kubectl delete namespace cpu-example
420418
<!--
421419
### For cluster administrators
422420
423-
* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/memory-default-namespace/)
424-
* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/cpu-default-namespace/)
425-
* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/memory-constraint-namespace/)
426-
* [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/cpu-constraint-namespace/)
427-
* [Configure Memory and CPU Quotas for a Namespace](/docs/tasks/administer-cluster/quota-memory-cpu-namespace/)
428-
* [Configure a Pod Quota for a Namespace](/docs/tasks/administer-cluster/quota-pod-namespace/)
421+
* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/)
422+
* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/)
423+
* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/)
424+
* [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/)
425+
* [Configure Memory and CPU Quotas for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/)
426+
* [Configure a Pod Quota for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-pod-namespace/)
429427
* [Configure Quotas for API Objects](/docs/tasks/administer-cluster/quota-api-object/)
430-
431428
-->
432429
### 针对集群管理员 {for-cluster-administrators}
433430

434431
* [配置名字空间的默认内存请求和限制](/zh-cn/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/)
435432
* [为名字空间配置默认 CPU 请求和限制](/zh-cn/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/)
436-
* [为名字空间配置最小和最大内存限制](/zh-cn/docs/tasks/administer-cluster//manage-resources/memory-constraint-namespace/)
433+
* [为名字空间配置最小和最大内存限制](/zh-cn/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/)
437434
* [为名字空间配置最小和最大 CPU 约束](/zh-cn/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/)
438435
* [为名字空间配置内存和 CPU 配额](/zh-cn/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/)
439436
* [为名字空间配置 Pod 配额](/zh-cn/docs/tasks/administer-cluster/manage-resources/quota-pod-namespace/)

0 commit comments

Comments
 (0)