Skip to content

Commit

Permalink
Make layout prettier in extended-resource-node.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhuzhenghao committed Jan 30, 2023
1 parent a1128ca commit f59e966
Showing 1 changed file with 13 additions and 28 deletions.
41 changes: 13 additions & 28 deletions content/en/docs/tasks/administer-cluster/extended-resource-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,16 @@ content_type: task
weight: 70
---


<!-- overview -->

This page shows how to specify extended resources for a Node.
Extended resources allow cluster administrators to advertise node-level
resources that would otherwise be unknown to Kubernetes.




## {{% heading "prerequisites" %}}


{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}




<!-- steps -->

## Get the names of your Nodes
Expand All @@ -39,7 +31,7 @@ the Kubernetes API server. For example, suppose one of your Nodes has four dongl
attached. Here's an example of a PATCH request that advertises four dongle resources
for your Node.

```shell
```
PATCH /api/v1/nodes/<your-node-name>/status HTTP/1.1
Accept: application/json
Content-Type: application/json-patch+json
Expand Down Expand Up @@ -69,9 +61,9 @@ Replace `<your-node-name>` with the name of your Node:

```shell
curl --header "Content-Type: application/json-patch+json" \
--request PATCH \
--data '[{"op": "add", "path": "/status/capacity/example.com~1dongle", "value": "4"}]' \
http://localhost:8001/api/v1/nodes/<your-node-name>/status
--request PATCH \
--data '[{"op": "add", "path": "/status/capacity/example.com~1dongle", "value": "4"}]' \
http://localhost:8001/api/v1/nodes/<your-node-name>/status
```

{{< note >}}
Expand Down Expand Up @@ -100,9 +92,9 @@ Once again, the output shows the dongle resource:

```yaml
Capacity:
cpu: 2
memory: 2049008Ki
example.com/dongle: 4
cpu: 2
memory: 2049008Ki
example.com/dongle: 4
```

Now, application developers can create Pods that request a certain
Expand Down Expand Up @@ -178,9 +170,9 @@ Replace `<your-node-name>` with the name of your Node:

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

Verify that the dongle advertisement has been removed:
Expand All @@ -191,20 +183,13 @@ kubectl describe node <your-node-name> | grep dongle

(you should not see any output)




## {{% heading "whatsnext" %}}


### For application developers

* [Assign Extended Resources to a Container](/docs/tasks/configure-pod-container/extended-resource/)
- [Assign Extended Resources to a Container](/docs/tasks/configure-pod-container/extended-resource/)

### For cluster administrators

* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/)
* [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/)



- [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/)
- [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/)

0 comments on commit f59e966

Please sign in to comment.