Skip to content

docs(workloads): add in-place Pod resize guidance#824

Open
yinshuxun wants to merge 3 commits into
masterfrom
feat/add-inplace-doc
Open

docs(workloads): add in-place Pod resize guidance#824
yinshuxun wants to merge 3 commits into
masterfrom
feat/add-inplace-doc

Conversation

@yinshuxun
Copy link
Copy Markdown
Contributor

@yinshuxun yinshuxun commented May 27, 2026

Document Pod resize workflows and related VPA links. Verified with lint, build, and live-cluster e2e checks.

Summary by CodeRabbit

  • Documentation
    • Added guidance on adjusting Pod CPU/memory live, including when in-place resizing applies, how to perform it, verification steps, and limitations.
    • Clarified VPA behavior vs. in-place resizing and introduced the InPlaceOrRecreate option with fallback-to-recreate details.
    • Improved navigation and links to related Pod resource adjustment workflows.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fb227cc1-9279-48cb-bb43-462172d88780

📥 Commits

Reviewing files that changed from the base of the PR and between 029368f and 3e0e69d.

📒 Files selected for processing (2)
  • docs/en/developer/building_application/application_workloads/resize_pod_resources_in_place.mdx
  • docs/en/developer/building_application/operation_maintaining/add_vpa.mdx
✅ Files skipped from review due to trivial changes (1)
  • docs/en/developer/building_application/application_workloads/resize_pod_resources_in_place.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/en/developer/building_application/operation_maintaining/add_vpa.mdx

Walkthrough

Adds a dedicated in-place Pod CPU/memory resizing guide, links it from the Pod CLI docs, and updates VPA docs to document InPlaceOrRecreate behavior and fallback-to-Pod-recreation notes.

Changes

In-place Pod Resource Resizing Documentation

Layer / File(s) Summary
New: Comprehensive in-place Pod resizing guide
docs/en/developer/building_application/application_workloads/resize_pod_resources_in_place.mdx
Introduces in-place Pod CPU/memory resizing via the pods/resize subresource, documents resizePolicy, multiple kubectl resize methods, verification/status checks, limitations, and related links.
Integration: Pod and VPA documentation updates
docs/en/developer/building_application/application_workloads/pod.mdx, docs/en/developer/building_application/operation_maintaining/add_vpa.mdx
Adds an "Adjusting Pod Resources" subsection in pod.mdx linking to the new guide; updates add_vpa.mdx with an informational callout and updateMode: InPlaceOrRecreate notes, including fallback-to-recreate behavior and disruption note updates.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 I hopped through pages, nibbling lines with cheer,
A resize guide sprouted for pods running near.
CPU and memory may shift without fright,
Linked the notes tidy — now docs shine bright. 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding documentation for in-place Pod resizing, which is the primary focus of this pull request across all three modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-inplace-doc

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
docs/en/developer/building_application/application_workloads/resize_pod_resources_in_place.mdx (1)

5-5: ⚡ Quick win

Clarify the title to avoid overpromising zero disruption.

The page title implies no disruption, but the page also documents RestartContainer behavior. Consider wording this as “without Pod recreation” to align expectations.

✏️ Suggested wording
-# Adjust Pod Resource Levels Without Pod Disruption
+# Adjust Pod Resource Levels Without Pod Recreation
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@docs/en/developer/building_application/application_workloads/resize_pod_resources_in_place.mdx`
at line 5, Update the page title "Adjust Pod Resource Levels Without Pod
Disruption" to avoid overpromising zero disruption—change it to something like
"Adjust Pod Resource Levels Without Pod Recreation" (or "without recreating the
Pod") and update any matching headings; also ensure any explanatory text
mentions that RestartContainer behavior may still cause container restarts,
referencing the RestartContainer behavior so readers understand the potential
for restart without full pod recreation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@docs/en/developer/building_application/application_workloads/resize_pod_resources_in_place.mdx`:
- Line 5: Update the page title "Adjust Pod Resource Levels Without Pod
Disruption" to avoid overpromising zero disruption—change it to something like
"Adjust Pod Resource Levels Without Pod Recreation" (or "without recreating the
Pod") and update any matching headings; also ensure any explanatory text
mentions that RestartContainer behavior may still cause container restarts,
referencing the RestartContainer behavior so readers understand the potential
for restart without full pod recreation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bf5dda30-7297-48f4-8a07-a68249c391c2

📥 Commits

Reviewing files that changed from the base of the PR and between a348818 and cda10ef.

📒 Files selected for processing (3)
  • docs/en/developer/building_application/application_workloads/pod.mdx
  • docs/en/developer/building_application/application_workloads/resize_pod_resources_in_place.mdx
  • docs/en/developer/building_application/operation_maintaining/add_vpa.mdx

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 27, 2026

Deploying alauda-container-platform with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3e0e69d
Status: ✅  Deploy successful!
Preview URL: https://e72efa88.alauda-container-platform.pages.dev
Branch Preview URL: https://feat-add-inplace-doc.alauda-container-platform.pages.dev

View logs

Document Pod resize workflows and related VPA links. Verified with lint, build, and live-cluster e2e checks.
@yinshuxun yinshuxun force-pushed the feat/add-inplace-doc branch from cda10ef to fa6361a Compare May 28, 2026 04:07
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@docs/en/developer/building_application/application_workloads/resize_pod_resources_in_place.mdx`:
- Around line 59-64: Add a note that the Kubernetes API server must support the
pods/resize subresource (in addition to using kubectl v1.32.0+); update the
paragraph to explicitly say "The Kubernetes API server must expose the
pods/resize subresource" and include a short verification hint such as using
kubectl api-resources or checking the API discovery (e.g., kubectl api-resources
| grep resize or curl the API discovery for pods/resize) so readers know how to
confirm their control plane supports the resize subresource.
- Around line 128-134: The doc incorrectly places the `Error` reason under
`PodResizePending`; update the snippet so `Error` is listed under
`PodResizeInProgress` (or add an explicit citation if you verify `Error` can
also appear under `PodResizePending`); specifically modify the bullets around
`PodResizeInProgress` and `PodResizePending` to show `Infeasible` and `Deferred`
as reasons for `PodResizePending` and move `Error` into the
`PodResizeInProgress` section (referencing the condition names
`PodResizeInProgress`, `PodResizePending`, and the reasons `Infeasible`,
`Deferred`, `Error`).
- Around line 141-142: Replace the two bullets with precise Kubernetes
conditions: state that Kubernetes does NOT support in-place CPU/memory resize
for Guaranteed Pods when cpuManagerPolicy=static or memoryManagerPolicy=Static
(mention both keys exactly: cpuManagerPolicy=static and
memoryManagerPolicy=Static and the term "Guaranteed Pods"), and note that if a
Pod/container is using swap memory then memory resize requires specifying
resizePolicy: { restartPolicy: RestartContainer } so the memory change is not
applied purely in-place (include the exact field name resizePolicy and
restartPolicy value RestartContainer).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 271ad332-8720-4be3-89ed-c9366a68b1b9

📥 Commits

Reviewing files that changed from the base of the PR and between cda10ef and fa6361a.

📒 Files selected for processing (3)
  • docs/en/developer/building_application/application_workloads/pod.mdx
  • docs/en/developer/building_application/application_workloads/resize_pod_resources_in_place.mdx
  • docs/en/developer/building_application/operation_maintaining/add_vpa.mdx
✅ Files skipped from review due to trivial changes (1)
  • docs/en/developer/building_application/application_workloads/pod.mdx

Comment on lines +128 to +134
Resize conditions include:

- `PodResizeInProgress`: kubelet can allocate the requested resources and is applying the change.
- `PodResizePending`: kubelet cannot apply the change immediately.
- `Infeasible`: The requested resize cannot be executed on the current node.
- `Deferred`: The requested resize is not currently possible, but might become possible later.
- `Error`: kubelet reports an error during resource allocation.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

Kubernetes Pod resize conditions PodResizeInProgress PodResizePending Infeasible Deferred

💡 Result:

In Kubernetes, the status of in-place Pod resizing is managed through two primary Pod conditions: PodResizePending and PodResizeInProgress [1][2]. This mechanism replaces the older, deprecated status.resize field [1][3]. PodResizePending This condition indicates that the Kubelet has received a request to resize a Pod but cannot immediately grant the resources [3][2]. The reason and message fields provide specific details [3]: 1. Infeasible: The requested resize is impossible to fulfill on the current node [4][3]. This occurs if the node lacks total capacity, the Pod is a static Pod, or the requested configuration (such as certain combinations of swap or static resource manager policies) is not supported [4]. Once marked Infeasible, the Kubelet will not re-evaluate the request [4]. 2. Deferred: The resize is theoretically feasible on the node but cannot be granted at the moment, typically due to temporary resource contention [4][3]. The Kubelet will periodically re-evaluate these requests, prioritizing them based on Pod priority (PriorityClass), Quality of Service (QoS) class, and the duration the request has been in the Deferred state [5][3]. PodResizeInProgress This condition indicates that the Kubelet has accepted the resize request and is in the process of applying the changes [3][2]. It is active whenever the allocated resources differ from the actuated (applied) resources [4]. If an error occurs during the actuation phase, this condition is set with reason: Error, and the message field contains the specific error details [4][3]. Under normal operations, this condition is typically short-lived while the runtime applies the new resource limits [3]. Summary of Key States: - PodResizePending: Kubelet cannot resize now. - Reason: Infeasible (permanent, will not retry) [4][3]. - Reason: Deferred (temporary, will retry) [4][3]. - PodResizeInProgress: Kubelet has accepted and is applying the resize [3][2]. - Reason: Error (actuation failure) [4][3].

Citations:


Fix/verify Error reason placement for Pod resize conditions.

Kubernetes in-place Pod resizing documents PodResizePending with reasons Infeasible and Deferred, while Error is associated with PodResizeInProgress when actuation fails. Update the doc snippet so Error is under PodResizeInProgress (or add an explicit citation if Error can also apply to PodResizePending).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@docs/en/developer/building_application/application_workloads/resize_pod_resources_in_place.mdx`
around lines 128 - 134, The doc incorrectly places the `Error` reason under
`PodResizePending`; update the snippet so `Error` is listed under
`PodResizeInProgress` (or add an explicit citation if you verify `Error` can
also appear under `PodResizePending`); specifically modify the bullets around
`PodResizeInProgress` and `PodResizePending` to show `Infeasible` and `Deferred`
as reasons for `PodResizePending` and move `Error` into the
`PodResizeInProgress` section (referencing the condition names
`PodResizeInProgress`, `PodResizePending`, and the reasons `Infeasible`,
`Deferred`, `Error`).

Comment on lines +141 to +142
- Pods managed by static `cpuManagerPolicy` or `memoryManagerPolicy` cannot be resized in place.
- Pods that use swap memory must use `RestartContainer` for memory requests.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

Kubernetes in-place Pod resize cpuManagerPolicy memoryManagerPolicy swap memory limitations

💡 Result:

Kubernetes in-place Pod resize (CPU/memory) behavior with cpuManagerPolicy, memoryManagerPolicy, and swap is constrained as follows. 1) What “in-place Pod resize” can change - Kubernetes supports in-place resizing of CPU and memory resources for running Pods (Pod vertical scaling). Pod-level aggregate CPU/memory in spec.resources can be updated in place without requiring a restart; container-level resizePolicy still governs whether the specific container is restarted for the resource change. [1] 2) cpuManagerPolicy (CPU Manager static policy) limitations - In-place resize is not supported for Guaranteed Pods when CPU Manager policy is set to static. This is explicitly called out by the in-place resize KEP logic via a “guaranteed_pod_cpu_manager_static_policy” condition. [2] - Practical implication: if you run Guaranteed pods (i.e., meet Guaranteed QoS conditions) with cpuManagerPolicy=static, Kubernetes will mark the resize as infeasible rather than trying to update cpusets live. [2][3] 3) memoryManagerPolicy (Memory Manager static policy) limitations - In-place resize is not supported for Guaranteed Pods when Memory Manager static policy is configured. This is explicitly called out via “guaranteed_pod_memory_manager_static_policy” condition. [2] - Practical implication: if you run Guaranteed pods with memoryManagerPolicy=Static, Kubelet will treat resize requests as unsupported/infeasible for those pods. [2][4] 4) Swap limitations for in-place resize - Kubernetes explicitly limits memory resizing for Pods that use swap: Pods utilizing swap memory cannot resize memory requests unless the memory resizePolicy restartPolicy is RestartContainer. [5] - If swap is enabled/used in the pod/container, in-place memory resize without a container restart is not allowed because swap settings (cgroup memory.swap.max) must be recalculated/aligned with updated memory requests. [6][5] 5) ResizePolicy details that drive restarts - Container spec.containers[*].resizePolicy controls restart behavior per resource type. - resizePolicy restartPolicy NotRequired applies the resource change without restarting the container. [5] - resizePolicy restartPolicy RestartContainer restarts the container when applying the new resource values (often required for memory). [5] - If both CPU and memory are being resized and memory’s policy requires a restart, the container will be restarted. [7] 6) Memory limit decrease behavior (additional relevant limitation) - For memory limit decreases, Kubernetes enforces that memory limits cannot be decreased unless the memory resize policy is RestartContainer. (So NotRequired is not sufficient for shrinking memory limits.) [8] Bottom line / quick matrix - cpuManagerPolicy=static + Guaranteed pod: in-place resize is not supported. [2] - memoryManagerPolicy=Static + Guaranteed pod: in-place resize is not supported. [2] - swap enabled (Pod “utilizing swap”): memory resize requires memory resizePolicy restartPolicy=RestartContainer (can’t be done purely in-place). [5] - Otherwise: container resizePolicy determines whether CPU/memory changes are applied live or via container restart. [1][5]

Citations:


Update the wording to match Kubernetes’ exact conditions for in-place resize (CPU/memory managers + swap)

  • For cpuManagerPolicy=static / memoryManagerPolicy=Static, Kubernetes does not support in-place Pod CPU/memory resize for Guaranteed Pods.
  • If the Pod/container is using swap memory, Kubernetes requires resizePolicy: { restartPolicy: RestartContainer } for the memory resize (so memory changes aren’t applied purely in-place).

docs/en/developer/building_application/application_workloads/resize_pod_resources_in_place.mdx (lines 141-142)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@docs/en/developer/building_application/application_workloads/resize_pod_resources_in_place.mdx`
around lines 141 - 142, Replace the two bullets with precise Kubernetes
conditions: state that Kubernetes does NOT support in-place CPU/memory resize
for Guaranteed Pods when cpuManagerPolicy=static or memoryManagerPolicy=Static
(mention both keys exactly: cpuManagerPolicy=static and
memoryManagerPolicy=Static and the term "Guaranteed Pods"), and note that if a
Pod/container is using swap memory then memory resize requires specifying
resizePolicy: { restartPolicy: RestartContainer } so the memory change is not
applied purely in-place (include the exact field name resizePolicy and
restartPolicy value RestartContainer).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant