Skip to content

Commit

Permalink
Add descriptions about allocatedResources, resources, and resize fields
Browse files Browse the repository at this point in the history
  • Loading branch information
vinaykul committed Mar 20, 2023
1 parent c62a880 commit a1bc39f
Showing 1 changed file with 22 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ weight: 30

<!-- overview -->

This page shows how to resize a CPU and memory resources assigned to containers
This page shows how to resize CPU and memory resources assigned to containers
of a running pod without restarting the pod or its containers. A Kubernetes node
allocates resources for a pod based on its **requests**, and limits the pod's
resource usage based on the **limits** specified in the pod's containers.
Expand All @@ -17,20 +17,38 @@ and memory resources. They now represent **desired** CPU and memory values. This
page assumes that you are familiar with [Quality of Service](/docs/tasks/configure-pod-container/quality-service-pod/)
for Kubernetes Pods.

Besides the aforementioned change, a new field named `allocatedResources` was
added to `containerStatuses` in the pod's status. This field reflects the
resources allocated to the pod's containers by the node.

In addition, a new field called `resources` was added to the container's status.
This field reflects the actual resource requests and limits that are configured
on the running containers as reported by the container runtime.

Lastly, a new field named `resize` was added to the pod's status to show the
status of the last requested resize. A value of `Proposed` is an acknowledgement
of the requested resize and indicates that request was validated and recorded. A
value of `InProgress` indicates that the node has accepted the resize request
and is in the process of applying the resize request to the pod's containers.
A value of `Deferred` means that the requested resize cannot be granted at this
time, and the node will keep retrying. The resize may be granted when other pods
leave and free up node resources. A value of `InFeasible` is a signal that the
node cannot accommodate the requested resize. This can happen if the requested
resize exceeds the maximum resources the node can ever allocate for a pod.


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


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



## Container Resize Policies

Resize policies allow for a more fine-grained control over how pod's containers
are resized for CPU and memory resource types. For example, the container's
are resized for CPU and memory resources. For example, the container's
application may be able to handle CPU resources resized while it continues to
run, but resizing memory limits may require that the container be restarted.
run, but resizing memory may require that the container be restarted.

To enable this, container specification allows users to specify **resizePolicy**.
The following restart policies can be specified for resizing CPU and memory:
Expand Down Expand Up @@ -221,7 +239,6 @@ kubectl delete namespace qos-example
## {{% heading "whatsnext" %}}



### For app developers

* [Assign Memory Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-memory-resource/)
Expand Down

0 comments on commit a1bc39f

Please sign in to comment.