@@ -4,24 +4,16 @@ content_type: task
44weight : 70
55---
66
7-
87<!-- overview -->
98
109This page shows how to specify extended resources for a Node.
1110Extended resources allow cluster administrators to advertise node-level
1211resources that would otherwise be unknown to Kubernetes.
1312
14-
15-
16-
1713## {{% heading "prerequisites" %}}
1814
19-
2015{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
2116
22-
23-
24-
2517<!-- steps -->
2618
2719## Get the names of your Nodes
@@ -39,7 +31,7 @@ the Kubernetes API server. For example, suppose one of your Nodes has four dongl
3931attached. Here's an example of a PATCH request that advertises four dongle resources
4032for your Node.
4133
42- ``` shell
34+ ```
4335PATCH /api/v1/nodes/<your-node-name>/status HTTP/1.1
4436Accept: application/json
4537Content-Type: application/json-patch+json
@@ -69,9 +61,9 @@ Replace `<your-node-name>` with the name of your Node:
6961
7062``` shell
7163curl --header " Content-Type: application/json-patch+json" \
72- --request PATCH \
73- --data ' [{"op": "add", "path": "/status/capacity/example.com~1dongle", "value": "4"}]' \
74- http://localhost:8001/api/v1/nodes/< your-node-name> /status
64+ --request PATCH \
65+ --data ' [{"op": "add", "path": "/status/capacity/example.com~1dongle", "value": "4"}]' \
66+ http://localhost:8001/api/v1/nodes/< your-node-name> /status
7567```
7668
7769{{< note >}}
@@ -100,9 +92,9 @@ Once again, the output shows the dongle resource:
10092
10193``` yaml
10294Capacity :
103- cpu : 2
104- memory : 2049008Ki
105- example.com/dongle : 4
95+ cpu : 2
96+ memory : 2049008Ki
97+ example.com/dongle : 4
10698` ` `
10799
108100Now, application developers can create Pods that request a certain
@@ -178,9 +170,9 @@ Replace `<your-node-name>` with the name of your Node:
178170
179171``` shell
180172curl --header " Content-Type: application/json-patch+json" \
181- --request PATCH \
182- --data ' [{"op": "remove", "path": "/status/capacity/example.com~1dongle"}]' \
183- http://localhost:8001/api/v1/nodes/< your-node-name> /status
173+ --request PATCH \
174+ --data ' [{"op": "remove", "path": "/status/capacity/example.com~1dongle"}]' \
175+ http://localhost:8001/api/v1/nodes/< your-node-name> /status
184176```
185177
186178Verify that the dongle advertisement has been removed:
@@ -191,20 +183,13 @@ kubectl describe node <your-node-name> | grep dongle
191183
192184(you should not see any output)
193185
194-
195-
196-
197186## {{% heading "whatsnext" %}}
198187
199-
200188### For application developers
201189
202- * [ Assign Extended Resources to a Container] ( /docs/tasks/configure-pod-container/extended-resource/ )
190+ - [ Assign Extended Resources to a Container] ( /docs/tasks/configure-pod-container/extended-resource/ )
203191
204192### For cluster administrators
205193
206- * [ Configure Minimum and Maximum Memory Constraints for a Namespace] ( /docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/ )
207- * [ Configure Minimum and Maximum CPU Constraints for a Namespace] ( /docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/ )
208-
209-
210-
194+ - [ Configure Minimum and Maximum Memory Constraints for a Namespace] ( /docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/ )
195+ - [ Configure Minimum and Maximum CPU Constraints for a Namespace] ( /docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/ )
0 commit comments