Skip to content

Commit 6c68cbb

Browse files
committed
[zh-cn] Sync extended-resource-node.md
1 parent e9b4412 commit 6c68cbb

File tree

1 file changed

+28
-22
lines changed

1 file changed

+28
-22
lines changed

content/zh-cn/docs/tasks/administer-cluster/extended-resource-node.md

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
22
title: 为节点发布扩展资源
33
content_type: task
4+
weight: 70
45
---
56
<!--
67
title: Advertise Extended Resources for a Node
78
content_type: task
9+
weight: 70
810
-->
911

1012
<!-- overview -->
@@ -26,14 +28,16 @@ resources that would otherwise be unknown to Kubernetes.
2628
<!--
2729
## Get the names of your Nodes
2830
29-
Choose one of your Nodes to use for this exercise.
3031
-->
3132
## 获取你的节点名称
3233

3334
```shell
3435
kubectl get nodes
3536
```
3637

38+
<!--
39+
Choose one of your Nodes to use for this exercise.
40+
-->
3741
选择一个节点用于此练习。
3842

3943
<!--
@@ -50,7 +54,7 @@ for your Node.
5054
例如:假设你的一个节点上带有四个 dongle 资源。
5155
下面是一个 PATCH 请求的示例,该请求为你的节点发布四个 dongle 资源。
5256

53-
```shell
57+
```
5458
PATCH /api/v1/nodes/<your-node-name>/status HTTP/1.1
5559
Accept: application/json
5660
Content-Type: application/json-patch+json
@@ -95,13 +99,13 @@ curl --header "Content-Type: application/json-patch+json" \
9599
http://localhost:8001/api/v1/nodes/<your-node-name>/status
96100
```
97101

102+
{{< note >}}
98103
<!--
99104
In the preceding request, `~1` is the encoding for the character / in
100105
the patch path. The operation path value in JSON-Patch is interpreted as a
101106
JSON-Pointer. For more details, see
102107
[IETF RFC 6901](https://tools.ietf.org/html/rfc6901), section 3.
103108
-->
104-
{{< note >}}
105109
在前面的请求中,`~1` 为 patch 路径中 “/” 符号的编码。
106110
JSON-Patch 中的操作路径值被解析为 JSON 指针。
107111
更多细节,请查看 [IETF RFC 6901](https://tools.ietf.org/html/rfc6901) 的第 3 节。
@@ -119,21 +123,25 @@ The output shows that the Node has a capacity of 4 dongles:
119123
"example.com/dongle": "4",
120124
```
121125

122-
<!-- Describe your Node: -->
126+
<!--
127+
Describe your Node:
128+
-->
123129
描述你的节点:
124130

125-
```shell
131+
```
126132
kubectl describe node <your-node-name>
127133
```
128134

129-
<!-- Once again, the output shows the dongle resource: -->
135+
<!--
136+
Once again, the output shows the dongle resource:
137+
-->
130138
输出再次展示了 dongle 资源:
131139

132140
```yaml
133141
Capacity:
134-
cpu: 2
135-
memory: 2049008Ki
136-
example.com/dongle: 4
142+
cpu: 2
143+
memory: 2049008Ki
144+
example.com/dongle: 4
137145
```
138146
139147
<!--
@@ -260,9 +268,9 @@ Replace `<your-node-name>` with the name of your Node:
260268

261269
```shell
262270
curl --header "Content-Type: application/json-patch+json" \
263-
--request PATCH \
264-
--data '[{"op": "remove", "path": "/status/capacity/example.com~1dongle"}]' \
265-
http://localhost:8001/api/v1/nodes/<your-node-name>/status
271+
--request PATCH \
272+
--data '[{"op": "remove", "path": "/status/capacity/example.com~1dongle"}]' \
273+
http://localhost:8001/api/v1/nodes/<your-node-name>/status
266274
```
267275

268276
<!--
@@ -275,29 +283,27 @@ kubectl describe node <your-node-name> | grep dongle
275283
```
276284

277285
<!--
278-
(you should not see any output)
286+
(you should not see any output)
279287
-->
280288
(你应该看不到任何输出)
281289

282-
283290
## {{% heading "whatsnext" %}}
284291

285292
<!--
286293
### For application developers
287294
288-
* [Assign Extended Resources to a Container](/docs/tasks/configure-pod-container/extended-resource/)
295+
- [Assign Extended Resources to a Container](/docs/tasks/configure-pod-container/extended-resource/)
289296
290297
### For cluster administrators
291298
292-
* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/memory-constraint-namespace/)
293-
* [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/cpu-constraint-namespace/)
299+
- [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/)
300+
- [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/)
294301
-->
295302
### 针对应用开发人员
296303

297-
* [将扩展资源分配给容器](/zh-cn/docs/tasks/configure-pod-container/extended-resource/)
298-
299-
### 针对集群管理员
304+
- [将扩展资源分配给容器](/zh-cn/docs/tasks/configure-pod-container/extended-resource/)
300305

301-
* [为名字空间配置最小和最大内存约束](/zh-cn/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/)
302-
* [为名字空间配置最小和最大 CPU 约束](/zh-cn/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/)
306+
### 针对集群管理员
303307

308+
- [为名字空间配置最小和最大内存约束](/zh-cn/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/)
309+
- [为名字空间配置最小和最大 CPU 约束](/zh-cn/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/)

0 commit comments

Comments
 (0)