@@ -7,7 +7,7 @@ weight: 30
77
88<!-- overview -->
99
10- This page shows how to resize a CPU and memory resources assigned to containers
10+ This page shows how to resize CPU and memory resources assigned to containers
1111of a running pod without restarting the pod or its containers. A Kubernetes node
1212allocates resources for a pod based on its ** requests** , and limits the pod's
1313resource usage based on the ** limits** specified in the pod's containers.
@@ -17,20 +17,38 @@ and memory resources. They now represent **desired** CPU and memory values. This
1717page assumes that you are familiar with [ Quality of Service] ( /docs/tasks/configure-pod-container/quality-service-pod/ )
1818for Kubernetes Pods.
1919
20+ Besides the aforementioned change, a new field named ` allocatedResources ` was
21+ added to ` containerStatuses ` in the pod's status. This field reflects the
22+ resources allocated to the pod's containers by the node.
23+
24+ In addition, a new field called ` resources ` was added to the container's status.
25+ This field reflects the actual resource requests and limits that are configured
26+ on the running containers as reported by the container runtime.
27+
28+ Lastly, a new field named ` resize ` was added to the pod's status to show the
29+ status of the last requested resize. A value of ` Proposed ` is an acknowledgement
30+ of the requested resize and indicates that request was validated and recorded. A
31+ value of ` InProgress ` indicates that the node has accepted the resize request
32+ and is in the process of applying the resize request to the pod's containers.
33+ A value of ` Deferred ` means that the requested resize cannot be granted at this
34+ time, and the node will keep retrying. The resize may be granted when other pods
35+ leave and free up node resources. A value of ` InFeasible ` is a signal that the
36+ node cannot accommodate the requested resize. This can happen if the requested
37+ resize exceeds the maximum resources the node can ever allocate for a pod.
38+
2039
2140## {{% heading "prerequisites" %}}
2241
2342
2443{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
2544
2645
27-
2846## Container Resize Policies
2947
3048Resize policies allow for a more fine-grained control over how pod's containers
31- are resized for CPU and memory resource types . For example, the container's
49+ are resized for CPU and memory resources . For example, the container's
3250application may be able to handle CPU resources resized while it continues to
33- run, but resizing memory limits may require that the container be restarted.
51+ run, but resizing memory may require that the container be restarted.
3452
3553To enable this, container specification allows users to specify ** resizePolicy** .
3654The following restart policies can be specified for resizing CPU and memory:
@@ -221,7 +239,6 @@ kubectl delete namespace qos-example
221239# # {{% heading "whatsnext" %}}
222240
223241
224-
225242# ## For app developers
226243
227244* [Assign Memory Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-memory-resource/)
0 commit comments