Skip to content

Commit 30a447f

Browse files
author
展望
committed
update content in zh assign-cpu-resource docs
1 parent bc3861a commit 30a447f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ API, `metrics.k8s.io`) is running, type the following command:
6161
查看是 metrics-server(或者其他资源度量 API 服务提供者,`metrics.k8s.io` )是否正在运行,请键入以下命令:
6262

6363
```shell
64-
kubectl get API services
64+
kubectl get apiservices
6565
```
6666
<!--
6767
If the resource metrics API is available, the output will include a
@@ -92,7 +92,7 @@ create in this exercise are isolated from the rest of your cluster.
9292
创建一个命名空间 {{< glossary_tooltip term_id="namespace" >}},以便在本练习中创建的资源与集群的其余部分资源隔离。
9393

9494
```shell
95-
kubectl create namespace CPU -example
95+
kubectl create namespace cpu-example
9696
```
9797

9898
<!--
@@ -159,9 +159,9 @@ and a CPU limit of 1 CPU.
159159
```yaml
160160
resources:
161161
limits:
162-
CPU : "1"
162+
cpu: "1"
163163
requests:
164-
CPU : 500m
164+
cpu: 500m
165165
```
166166
167167
<!--
@@ -179,8 +179,8 @@ just a bit less than the limit of 1 CPU specified in the Pod configuration.
179179
-->
180180
此示例的输出,显示 Pod 使用的是974 milliCPU,即仅略低于 Pod 配置中指定的 1 个 CPU 的限制。
181181
```
182-
NAME CPU (cores) MEMORY(bytes)
183-
CPU -demo 974m <something>
182+
NAME CPU(cores) MEMORY(bytes)
183+
cpu-demo 974m <something>
184184
```
185185
<!--
186186
Recall that by setting `-cpu "2"`, you configured the Container to attempt to use 2 CPUs, but the Container is only being allowed to use about 1 CPU. The container's CPU use is being throttled, because the container is attempting to use more CPU resources than its limit.

0 commit comments

Comments
 (0)