Skip to content

Commit 3a07e89

Browse files
committed
Addressing review comments
1 parent 7bedc9b commit 3a07e89

3 files changed

Lines changed: 21 additions & 22 deletions

File tree

content/en/docs/reference/command-line-tools-reference/feature-gates/InPlacePodLevelResourcesVerticalScaling.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ stages:
1010
defaultValue: false
1111
fromVersion: "1.35"
1212
---
13-
Enables in-place pod-level resources vertical scaling.
13+
Enables the in-place vertical scaling of resources for a Pod (For example, changing a
14+
running Pod's pod-level CPU or memory requests/limits without needing to restart
15+
it). For details, see the documentation on [In-place Pod-level Resources Vertical Scaling](/docs/tasks/configure-pod-container/resize-pod-resources/).

content/en/docs/tasks/configure-pod-container/assign-cpu-resource.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ kubectl delete namespace cpu-example
263263

264264
* [Resize CPU and Memory Resources assigned to Containers](/docs/tasks/configure-pod-container/resize-container-resources/)
265265

266+
* [Resize Pod-level CPU and Memory Resources](/docs/tasks/configure-pod-container/resize-pod-resources/)
267+
266268
### For cluster administrators
267269

268270
* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/)

content/en/docs/tasks/configure-pod-container/resize-pod-resources.md

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,43 +11,38 @@ min-kubernetes-server-version: 1.35
1111

1212
This page explains how to change the CPU and memory resources set at the Pod level without recreating the Pod.
1313

14-
The In-place Pod Resize feature allows modifying resource allocations for a running Pod, avoiding application disruption. The process for resizing individual container resources is covered in the documentation [Resize CPU and Memory Resources assigned to Containers](/docs/tasks/configure-pod-container/resize-container-resources.md).
14+
The In-place Pod Resize feature allows modifying resource allocations for a running Pod, avoiding application disruption. The process for resizing individual container resources is covered in [Resize CPU and Memory Resources assigned to Containers](/docs/tasks/configure-pod-container/resize-container-resources).
1515

16-
This document focuses on the new capability introduced in Kubernetes v1.35: In-place
17-
Pod-Level Resources Resize. Pod-level resources are defined in spec.resources and
18-
act as an upper bound constraint on the aggregate resources used by all containers
19-
within the Pod. In-place Pod-Level Resources Resize feature allows you to change
20-
these overall aggregate CPU/memory allocations for a running Pod directly.
16+
This page highlights In-place Pod-level resources resize. Pod-level resources
17+
are defined in `spec.resources` and they act as the upper bound on the aggregate resources
18+
consumed by all containers in the Pod. The In-place Pod-level resources resize feature
19+
lets you change these aggregate CPU and memory allocations for a running Pod directly.
2120

2221
## {{% heading "prerequisites" %}}
2322

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

26-
Your Kubernetes server must be at or later than version 1.35.
27-
To check the version, enter kubectl version.
25+
The following [feature gates](/docs/reference/command-line-tools-reference/feature-gates/)
26+
must be enabled for your control plane and for all nodes in your cluster:
2827

29-
The following [feature
30-
gates](/docs/reference/command-line-tools-reference/feature-gates/) must be enabled
31-
for your control plane and for all nodes in your cluster:
28+
* [`InPlacePodLevelResourcesVerticalScaling`](/docs/reference/command-line-tools-reference/feature-gates/#InPlacePodLevelResourcesVerticalScaling)
29+
* [`PodLevelResources`](/docs/reference/command-line-tools-reference/feature-gates/#PodLevelResources)
30+
* [`InPlacePodVerticalScaling`](/docs/reference/command-line-tools-reference/feature-gates/#InPlacePodVerticalScaling)
31+
* [`NodeDeclaredFeatures`](/docs/reference/command-line-tools-reference/feature-gates/#NodeDeclaredFeatures)
3232

33-
* `InPlacePodLevelResourcesVerticalScaling`
34-
* `PodLevelResources`
35-
* `InPlacePodVerticalScaling`
36-
37-
The kubectl client version must be at least v1.32 to use the
38-
--subresource=resize flag.
33+
The kubectl client version must be at least v1.32 to use the `--subresource=resize` flag.
3934

4035
## Pod Resize Status and Retry Logic
4136

42-
The mechanism the Kubelet uses to track and retry resource changes is shared between container-level and Pod-level resize requests.
37+
The mechanism the `kubelet` uses to track and retry resource changes is shared between container-level and Pod-level resize requests.
4338

4439
The statuses, reasons, and retry priorities are identical to those defined for container resize:
4540

46-
* Status Conditions: The Kubelet uses PodResizePending (with reasons like Infeasible or Deferred) and PodResizeInProgress to communicate the state of the request.
41+
* Status Conditions: The `kubelet` uses PodResizePending (with reasons like Infeasible or Deferred) and PodResizeInProgress to communicate the state of the request.
4742

4843
* Retry Priority: Deferred resizes are retried based on PriorityClass, then QoS class (Guaranteed over Burstable), and finally by the duration they have been deferred.
4944

50-
* Tracking: You can use the observedGeneration fields to track which Pod specification (metadata.generation) corresponds to the status of the latest processed resize request.
45+
* Tracking: You can use the `observedGeneration` fields to track which Pod specification (metadata.generation) corresponds to the status of the latest processed resize request.
5146

5247
For a full description of these conditions and retry logic, please refer to the [Pod resize status](/docs/tasks/configure-pod-container/resize-container-resources/#pod-resize-status) section in the container resize documentation.
5348

@@ -126,7 +121,7 @@ You should see:
126121
* `status.containerStatuses[0].restartCount` remains `0`, because the CPU
127122
`resizePolicy` was `NotRequired`.
128123
* `status.containerStatuses[1].restartCount` increased to `1` indicating the
129-
container was restarted to apply the CPU change. The restart occurred in Container 1 despite the resize being applied at the Pod level, due to the intricate relationship between Pod-level limits and container-level policies. Because Container 1 did not specify an explicit CPU limit, its underlying resource configuration (e.g., cgroups) implicitly adopted the Pod's overall CPU limit as its effective maximum consumption boundary. When the Pod-level CPU limit was patched from 200m to 300m, this action consequently changed the implicit limit enforced on Container 1. Since Container 1 had its resizePolicy explicitly set to RestartContainer for CPU, the Kubelet was obligated to restart the container to correctly apply this change in the underlying resource enforcement mechanism, thus confirming that altering Pod-level limits can trigger container restart policies even when container limits are not directly defined.
124+
container was restarted to apply the CPU change. The restart occurred in Container 1 despite the resize being applied at the Pod level, due to the intricate relationship between Pod-level limits and container-level policies. Because Container 1 did not specify an explicit CPU limit, its underlying resource configuration (For example, cgroups) implicitly adopted the Pod's overall CPU limit as its effective maximum consumption boundary. When the Pod-level CPU limit was patched from 200m to 300m, this action consequently changed the implicit limit enforced on Container 1. Since Container 1 had its resizePolicy explicitly set to RestartContainer for CPU, the `kubelet` was obligated to restart the container to correctly apply this change in the underlying resource enforcement mechanism, thus confirming that altering Pod-level limits can trigger container restart policies even when container limits are not directly defined.
130125

131126
## Clean up
132127

0 commit comments

Comments
 (0)