@@ -4,24 +4,16 @@ content_type: task
4
4
weight : 70
5
5
---
6
6
7
-
8
7
9
8
10
9
This page shows how to specify extended resources for a Node.
11
10
Extended resources allow cluster administrators to advertise node-level
12
11
resources that would otherwise be unknown to Kubernetes.
13
12
14
-
15
-
16
-
17
13
## {{% heading "prerequisites" %}}
18
14
19
-
20
15
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
21
16
22
-
23
-
24
-
25
17
26
18
27
19
## Get the names of your Nodes
@@ -39,7 +31,7 @@ the Kubernetes API server. For example, suppose one of your Nodes has four dongl
39
31
attached. Here's an example of a PATCH request that advertises four dongle resources
40
32
for your Node.
41
33
42
- ``` shell
34
+ ```
43
35
PATCH /api/v1/nodes//status HTTP/1.1
44
36
Accept: application/json
45
37
Content-Type: application/json-patch+json
@@ -69,9 +61,9 @@ Replace `` with the name of your Node:
69
61
70
62
``` shell
71
63
curl --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
75
67
```
76
68
77
69
{{< note >}}
@@ -100,9 +92,9 @@ Once again, the output shows the dongle resource:
100
92
101
93
``` yaml
102
94
Capacity :
103
- cpu : 2
104
- memory : 2049008Ki
105
- example.com/dongle : 4
95
+ cpu : 2
96
+ memory : 2049008Ki
97
+ example.com/dongle : 4
106
98
` ` `
107
99
108
100
Now, application developers can create Pods that request a certain
@@ -178,9 +170,9 @@ Replace `` with the name of your Node:
178
170
179
171
``` shell
180
172
curl --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
184
176
```
185
177
186
178
Verify that the dongle advertisement has been removed:
@@ -191,20 +183,13 @@ kubectl describe node | grep dongle
191
183
192
184
(you should not see any output)
193
185
194
-
195
-
196
-
197
186
## {{% heading "whatsnext" %}}
198
187
199
-
200
188
### For application developers
201
189
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/ )
203
191
204
192
### For cluster administrators
205
193
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