Skip to content

Conversation

@tallclair
Copy link
Member

@tallclair tallclair commented Mar 28, 2025

Description

InPlacePodVerticalScaling is graduating to beta in v1.33. I rewrote the primary doc page to capture v1.33 changes and hopefully generally add clarity and detail.

Issue

Fixes #50022

/sig node
/priority important-soon
/milestone v1.33

@k8s-ci-robot
Copy link
Contributor

@tallclair: You must be a member of the kubernetes/website-milestone-maintainers GitHub team to set the milestone. If you believe you should be able to issue the /milestone command, please contact your Website milestone maintainers and have them propose you as an additional delegate for this responsibility.

In response to this:

Description

InPlacePodVerticalScaling is graduating to beta in v1.33. I rewrote the primary doc page to capture v1.33 changes and hopefully generally add clarity and detail.

I plan to add more references to in-place resizing to other relevant pages (see #50022) in a separate PR.

Issue

Part of #50022

/sig node
/priority important-soon
/milestone v1.33

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added sig/node Categorizes an issue or PR as relevant to SIG Node. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Mar 28, 2025
@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 28, 2025
@netlify
Copy link

netlify bot commented Mar 28, 2025

👷 Deploy Preview for kubernetes-io-vnext-staging processing.

Name Link
🔨 Latest commit 9cce97a
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/67f31ef205562100087a0dc0

@tallclair
Copy link
Member Author

/assign @natasha41575
/cc @sftim

@netlify
Copy link

netlify bot commented Mar 28, 2025

Pull request preview available for checking

Name Link
🔨 Latest commit 9cce97a
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/67f31ef27c1cd90008148e9a
😎 Deploy Preview https://deploy-preview-50290--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I'm afraid we need a wider change, given the graduation to beta.

We must also update the Pod documentation at https://kubernetes.io/docs/concepts/workloads/pods/

For beta, and given that this will be enabled by default, I judge that revising the Pod concept docs is a requirement.


Below example shows a Pod whose Container's CPU can be resized without restart, but
resizing memory requires the container to be restarted.
You can control whether a container should be restarted when resizing by setting `resizePolicy` within the container specification. This allows fine-grained control based on resource type (CPU or memory).
Copy link
Contributor

Choose a reason for hiding this comment

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

What about extended resources (eg from device plugins)? The docs should make the story clear for those.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is covered under key-concepts (only CPU & Memory are mutable) and limitations. Do you have any suggestions of how to raise the visibility of this?

* **Resource Removal:** Resource requests and limits cannot be entirely removed once set; they can only be changed to different values.
* **Operating System:** Windows pods do not support in-place resize.
* **Node Policies:** Pods managed by [static CPU or Memory manager policies](/docs/tasks/administer-cluster/cpu-management-policies/) cannot be resized in-place.
* **Swap:** Pods utilizing [swap memory](/docs/concepts/architecture/nodes/#swap-memory) cannot resize memory requests unless the `resizePolicy` for memory is `RestartContainer`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this true?

Suggested change
* **Swap:** Pods utilizing [swap memory](/docs/concepts/architecture/nodes/#swap-memory) cannot resize memory requests unless the `resizePolicy` for memory is `RestartContainer`.
* **Swap:** Pods utilizing [swap memory](/docs/concepts/architecture/nodes/#swap-memory) can only resize memory requests if the `resizePolicy` for memory is `RestartContainer`. If the `resizePolicy` is set to something else, the API server accepts the resize request but it will not succeed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Again, do you think it's necessary to describe the enforcement mechanism here? Here's the full list:

Enforced in API admission:

  • Resource type
  • QoS class
  • Container types
  • Windows pods (only if OS name is windows)
  • Resource removal

Enforced at allocation time (resize marked Infeasible):

  • Static CPU / memory
  • Swap
  • node Capacity (not listed here)
  • Windows (anything that slipped through admission)

## Example 1: Resizing CPU without Restart

## Create a pod with resource requests and limits
First, create a Pod designed for in-place CPU resize and restart-required memory resize.
Copy link
Contributor

Choose a reason for hiding this comment

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

What namespace is this Pod in? Do you need to create a namespace first?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking they could just use the default namespace, since it's just a single resource being created. Is it standard practice to create a dedicated namespace for all tutorials?


```shell
kubectl get pod qos-demo-5 --output=yaml --namespace=qos-example
kubectl patch pod resize-demo --subresource resize --patch \
Copy link
Contributor

Choose a reason for hiding this comment

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

What namespace is change happening in? Do you need to create a namespace first?

Copy link
Member Author

Choose a reason for hiding this comment

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

(see above)

Delete the pod:

```shell
kubectl delete namespace qos-example
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the namespace need removing or not?

@github-project-automation github-project-automation bot moved this from Triage to Waiting on Author in SIG Node: code and documentation PRs Mar 28, 2025
@sftim
Copy link
Contributor

sftim commented Mar 28, 2025

@tallclair if you want to bring in another contributor to work on some of these docs, that's fine; it doesn't have to all land on you.

@sftim
Copy link
Contributor

sftim commented Mar 28, 2025

/milestone 1.33

@sftim sftim added this to the 1.33 milestone Mar 28, 2025
@sftim
Copy link
Contributor

sftim commented Mar 28, 2025

Actually, we can hold this PR whilst we get the Pod concept changes prepared and then unhold all the related PRs once it's clear that the docs will be ready.

@tallclair would you prefer that?

@natasha41575
Copy link
Contributor

/lgtm
for the content

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 28, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: ed1d44ec9aaa194d56a02393fc0f8d4c022438c4

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 28, 2025
@tallclair
Copy link
Member Author

I decided to just add the auxilary pages to this PR.

/assign @sftim

@tallclair
Copy link
Member Author

Thanks for the review @vinaykul !

@tallclair
Copy link
Member Author

/assign @vinaykul

Copy link
Member

@vinaykul vinaykul left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 6, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: a3ea774aa818bd5beeba4aba152c50030208bf54

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 6, 2025
@k8s-ci-robot k8s-ci-robot requested review from sftim and vinaykul April 6, 2025 22:44
@tengqm tengqm added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Apr 7, 2025
@tengqm
Copy link
Contributor

tengqm commented Apr 7, 2025

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tengqm, vinaykul

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 7, 2025
@rayandas
Copy link
Member

rayandas commented Apr 7, 2025

@vinaykul Could you please give another lgtm? It got removed after a new commit. Thanks!

@vinaykul
Copy link
Member

vinaykul commented Apr 7, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 7, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 43a8798ccc6541b76c15fe76ce55bb0156497766

@k8s-ci-robot k8s-ci-robot merged commit c014f72 into kubernetes:dev-1.33 Apr 7, 2025
6 checks passed
@github-project-automation github-project-automation bot moved this from Waiting on Author to Done in SIG Node: code and documentation PRs Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/node Categorizes an issue or PR as relevant to SIG Node. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

Development

Successfully merging this pull request may close these issues.

7 participants