diff --git a/content/en/docs/tasks/configure-pod-container/resize-container-resources.md b/content/en/docs/tasks/configure-pod-container/resize-container-resources.md index b02e981fe6aa3..84265ec08844d 100644 --- a/content/en/docs/tasks/configure-pod-container/resize-container-resources.md +++ b/content/en/docs/tasks/configure-pod-container/resize-container-resources.md @@ -7,7 +7,7 @@ weight: 30 -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. @@ -17,6 +17,25 @@ 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" %}} @@ -24,13 +43,12 @@ for Kubernetes Pods. {{< 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: @@ -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/)