-
Feature
-
Resolution: Unresolved
-
Normal
-
None
Feature Overview (aka. Goal Summary)
This feature is only to cover the docs.
Previously, this feature was in alpha in Kubernetes 1.27 and behind a feature gate from OpenShift 4.14. This feature was already covered by the blog https://www.redhat.com/en/blog/in-place-resource-resize-of-openshift-pod-spec.
The in-place resource resize feature in OpenShift allows you to adjust the CPU and memory requests and limits of a running Pod without the need to recreate it. Traditionally, modifying these resources required deleting and recreating the Pod, which could lead to downtime. This feature provides more dynamic resource management, leading to reduced downtime, more efficient resource utilization, cost savings, and simplified operations.
How it works:
When you update the desired CPU and memory requests and limits in a Pod's specification, the Kubelet attempts to resize the container if the desired resources differ from the currently allocated ones. The status.containerStatuses[*].resources field reflects the resources currently configured for the running container. During a resize, the Pod's status conditions, such as PodResizePending (indicating it cannot immediately grant the request) or PodResizeInProgress (indicating the changes are being applied), will update. You can control whether a container should restart when resources are resized by setting a resizePolicy for CPU or memory; the default is NotRequired.
{*}Restrictions
{*}Only CPU and memory can be resized; other resources like storage are not currently supported for in-place resizing
Acceptance criteria
Resize the Container's Resources should not restart the pods.{}
You can create Pod using oc create -f <your-pod-definition.yaml>.
You should see resizePolicy fields populated in the container spec and allocatedResources fields populated in the container status. $ oc get pod <pod-name>{{ -o yaml}}
Resize the Container's Resources ** using oc patch to modify the CPU and memory requests and limits for the running Pod.
The resize is not instantaneous. After patching, you will see a resize field appear in the Pod status, and the Pod will go through Proposed and InProgress phases. Once the resize is complete, your resource changes will be reflected in the container status. You can monitor the resize status: {{$ oc get pods <pod-name> -o jsonpath="
{'\n'}
"}} And observe the final resource changes:
- clones
-
OCPSTRAT-2388 Custom Metrics Autoscaler 2.17.2 Release
-
- Closed
-
- links to