@@ -27,7 +27,7 @@ allocated as much CPU as it requests.
27
27
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
28
28
29
29
<!--
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 .
31
31
32
32
A few of the steps on this page require you to run the
33
33
[metrics-server](https://github.com/kubernetes-sigs/metrics-server)
@@ -37,7 +37,7 @@ running, you can skip those steps.
37
37
If you are running {{< glossary_tooltip term_id="minikube" >}}, run the
38
38
following command to enable metrics-server:
39
39
-->
40
- 集群中的每个节点必须至少有 1 个 CPU 可用才能运行本任务中的示例。
40
+ 你的集群必须至少有 1 个 CPU 可用才能运行本任务中的示例。
41
41
42
42
本页的一些步骤要求你在集群中运行
43
43
[ metrics-server] ( https://github.com/kubernetes-sigs/metrics-server )
@@ -61,7 +61,7 @@ kubectl get apiservices
61
61
```
62
62
63
63
<!--
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
65
65
reference to `metrics.k8s.io`.
66
66
-->
67
67
如果资源指标 API 可用,则会输出将包含一个对 ` metrics.k8s.io ` 的引用。
@@ -124,7 +124,7 @@ kubectl apply -f https://k8s.io/examples/pods/resource/cpu-request-limit.yaml --
124
124
```
125
125
126
126
<!--
127
- Verify that the Pod is running:
127
+ Verify that the Pod is running:
128
128
-->
129
129
验证所创建的 Pod 处于 Running 状态
130
130
@@ -182,15 +182,13 @@ Recall that by setting `-cpu "2"`, you configured the Container to attempt to us
182
182
但是容器只被允许使用大约 1 个 CPU。
183
183
容器的 CPU 用量受到限制,因为该容器正尝试使用超出其限制的 CPU 资源。
184
184
185
+ {{< note >}}
185
186
<!--
186
187
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.
190
189
-->
191
- {{< note >}}
192
190
CPU 使用率低于 1.0 的另一种可能的解释是,节点可能没有足够的 CPU 资源可用。
193
- 回想一下,此练习的先决条件需要你的节点至少具有 1 个 CPU 可用。
191
+ 回想一下,此练习的先决条件需要你的集群至少具有 1 个 CPU 可用。
194
192
如果你的容器在只有 1 个 CPU 的节点上运行,则容器无论为容器指定的 CPU 限制如何,
195
193
都不能使用超过 1 个 CPU。
196
194
{{< /note >}}
@@ -276,7 +274,7 @@ Pod 调度是基于资源请求值来进行的。
276
274
kubectl apply -f https://k8s.io/examples/pods/resource/cpu-request-limit-2.yaml --namespace=cpu-example
277
275
```
278
276
<!--
279
- View the Pod status:
277
+ View the Pod status:
280
278
-->
281
279
查看该 Pod 的状态:
282
280
@@ -420,20 +418,19 @@ kubectl delete namespace cpu-example
420
418
<!--
421
419
### For cluster administrators
422
420
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/)
429
427
* [Configure Quotas for API Objects](/docs/tasks/administer-cluster/quota-api-object/)
430
-
431
428
-->
432
429
### 针对集群管理员 {for-cluster-administrators}
433
430
434
431
* [ 配置名字空间的默认内存请求和限制] ( /zh-cn/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/ )
435
432
* [ 为名字空间配置默认 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/ )
437
434
* [ 为名字空间配置最小和最大 CPU 约束] ( /zh-cn/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/ )
438
435
* [ 为名字空间配置内存和 CPU 配额] ( /zh-cn/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/ )
439
436
* [ 为名字空间配置 Pod 配额] ( /zh-cn/docs/tasks/administer-cluster/manage-resources/quota-pod-namespace/ )
0 commit comments