Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update In-Place Pod Resize docs for v1.32 #48503

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

tallclair
Copy link
Member

@tallclair tallclair commented Oct 22, 2024

Description

Update the in-place pod resize documentation for beta in v1.32.

Issue

For kubernetes/enhancements#1287
Fixes #48534

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 22, 2024
@k8s-ci-robot k8s-ci-robot added this to the 1.32 milestone Oct 22, 2024
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 22, 2024
Copy link

netlify bot commented Oct 22, 2024

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

Name Link
🔨 Latest commit 1a730fd
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/67461d97db0c5a000868391e

Copy link

netlify bot commented Oct 22, 2024

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 1a730fd
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/67461d9786039b00084f2cb6
😎 Deploy Preview https://deploy-preview-48503--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.

@k8s-ci-robot k8s-ci-robot added area/blog Issues or PRs related to the Kubernetes Blog subproject language/en Issues or PRs related to English language size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 28, 2024
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 28, 2024
@hacktivist123
Copy link
Contributor

Hello @tallclair 👋 please take a look at Documenting for a release - PR Ready for Review to get your PR ready for review before Tuesday November 19th 2024 18:00 PST. Thank you!

@tallclair
Copy link
Member Author

I will get this sent out today.

@tallclair tallclair changed the title [PLACEHOLDER] In-Place Pod Resize v1.32 (beta) In-Place Pod Resize v1.32 (beta) Nov 19, 2024
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 19, 2024
@tallclair tallclair marked this pull request as ready for review November 19, 2024 01:05
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 19, 2024
@tallclair
Copy link
Member Author

/sig node

@k8s-ci-robot k8s-ci-robot added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Nov 19, 2024
@tallclair
Copy link
Member Author

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 20, 2024
@chanieljdan
Copy link
Contributor

doc updates for behavior changes are fine, but drop out the beta promotion bit, beta promotion was reverted in kubernetes/kubernetes#128875

Hi @tallclair as we approach docs freeze tomorrow, are you able to make this change? Docs freeze is tomorrow at 18:00 PDT.

@haircommander
Copy link
Contributor

this KEP was pulled back to alpha state, @tallclair do you plan on updating 1.32 docs with what changed in alpha?

@tallclair
Copy link
Member Author

The only thing that needs to change in this is reverting the feature state change. Everything else should be accurate. I won't be able to fix this until tomorrow though. If anyone wants to fork the pr that works be helpful, otherwise I'll need an exception to get to it tomorrow

@sftim
Copy link
Contributor

sftim commented Nov 26, 2024

How's this?

@haircommander
Copy link
Contributor

LGTM, I'm fine with this or #48857

@dchen1107
Copy link
Member

/lgtm

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

LGTM label has been added.

Git tree hash: 739291fa7b5d4d9f1d0d1ba5309f53d95f278b1e

@tallclair
Copy link
Member Author

Changes lgtm. Thank you @sftim for helping with this!

@salaxander
Copy link
Contributor

/lgtm from SIG docs

@@ -24,26 +24,33 @@ to be enabled. The alternative is to delete the Pod and let the
[workload controller](/docs/concepts/workloads/controllers/) make a replacement Pod
that has a different resource requirement.

A resize request is made through the pod `/resize` subresource, which takes the full updated pod for
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: use Pod, not pod throughout this diff.

@@ -107,6 +114,21 @@ have changed, the container will be restarted in order to resize its memory.

<!-- steps -->

## Limitations
Copy link
Contributor

Choose a reason for hiding this comment

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

This belongs further up. Make this either a subheading of the prerequisites heading or a main heading before the prerequisites heading.

@@ -24,26 +24,33 @@ to be enabled. The alternative is to delete the Pod and let the
[workload controller](/docs/concepts/workloads/controllers/) make a replacement Pod
that has a different resource requirement.

A resize request is made through the pod `/resize` subresource, which takes the full updated pod for
an update request, or a patch on the pod object for a patch request.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
an update request, or a patch on the pod object for a patch request.
an update request, or a patch on the `Pod` object for a patch request.

Comment on lines +33 to +36
- The `resources` field in `containerStatuses` of the Pod's status reflects the resources
_allocated_ to the pod's containers. For running containers, this reflects the actual resource
`requests` and `limits` that are configured as reported by the container runtime. For non-running
containers, these are the resources allocated for the container when it starts.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- The `resources` field in `containerStatuses` of the Pod's status reflects the resources
_allocated_ to the pod's containers. For running containers, this reflects the actual resource
`requests` and `limits` that are configured as reported by the container runtime. For non-running
containers, these are the resources allocated for the container when it starts.
- The `containerStatuses.resources` field in the Pod `status` field reflects the resources
that are _allocated_ to the Pod's containers. For running containers, these are the actual values
of `requests` and `limits`, as reported by the container runtime. For non-running containers,
these are the resources that are allocated for when the container starts.

Comment on lines +39 to +40
- `Proposed`: This value indicates that a pod was resized, but the Kubelet has not yet processed
the resize.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- `Proposed`: This value indicates that a pod was resized, but the Kubelet has not yet processed
the resize.
- `Proposed`: this value indicates that a Pod resize request was received, but the
kubelet has not yet processed the resize.

Comment on lines +52 to +53
If a node has pods with an incomplete resize, the scheduler will compute the pod requests from the
maximum of a container's desired resource requests, and it's actual requests reported in the status.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
If a node has pods with an incomplete resize, the scheduler will compute the pod requests from the
maximum of a container's desired resource requests, and it's actual requests reported in the status.
If a node has Pods with an incomplete resize, the scheduler uses the largest of the following values to
calculate the Pod requests:
* The desired resource requests for all containers in the Pod, as specified in the
`spec.containers.resources.requests` field.
* The actual resource requests for all containers in the Pod, as reported in the
`spec.status.containerStatuses.resources.requests` field.

@@ -107,6 +114,21 @@ have changed, the container will be restarted in order to resize its memory.

<!-- steps -->

## Limitations

In-place resize of pod resources currently has the following limitations:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
In-place resize of pod resources currently has the following limitations:
In-place resize of Pod resources has the following limitations:

Comment on lines +122 to +124
- Pod QoS Class cannot change. This means that requests must continue to equal limits for Guaranteed
pods, Burstable pods cannot set requests and limits to be equal for both CPU & memory, and you
cannot add resource requirements to Best Effort pods.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Pod QoS Class cannot change. This means that requests must continue to equal limits for Guaranteed
pods, Burstable pods cannot set requests and limits to be equal for both CPU & memory, and you
cannot add resource requirements to Best Effort pods.
- The Pod QoS Class cannot change. The following considerations continue to apply:
- Guaranteed QoS Pods: requests must be equal to limits.
- Burstable QoS Pods: requests can't be equal to limits for both CPU and memory
- Best Effort QoS Pods: you can't set resource requirements

- Pod QoS Class cannot change. This means that requests must continue to equal limits for Guaranteed
pods, Burstable pods cannot set requests and limits to be equal for both CPU & memory, and you
cannot add resource requirements to Best Effort pods.
- Init containers and Ephemeral Containers cannot be resized.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Init containers and Ephemeral Containers cannot be resized.
- Init containers and ephemeral containers cannot be resized.

Comment on lines +127 to +129
- A container's memory limit may not be reduced below its usage. If a request puts a container in
this state, the resize status will remain in `InProgress` until the desired memory limit becomes
feasible.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- A container's memory limit may not be reduced below its usage. If a request puts a container in
this state, the resize status will remain in `InProgress` until the desired memory limit becomes
feasible.
- A container's memory limit can't be reduced below the memory usage. If a request puts a
container in this state, the resize will remain in the `InProgress` state until the desired
memory limit becomes feasible.

@shannonxtreme
Copy link
Contributor

@tallclair while I'd really like to see some of the editorial changes implemented before you submit, they aren't blocking, so I'm LGTMing as-is

/lgtm

@chanieljdan
Copy link
Contributor

Docs and Technical LGTM noted. In the interest of time we'll approve these changes as is.

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 26, 2024
@reylejano
Copy link
Member

The changes suggested by @shannonxtreme can be addressed in a follow-up PR
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chanieljdan, reylejano

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

@mengjiao-liu
Copy link
Member

It looks like the hold can now be lifted. @tallclair

@sftim
Copy link
Contributor

sftim commented Nov 27, 2024

/retitle Update In-Place Pod Resize docs for v1.32

@k8s-ci-robot k8s-ci-robot changed the title In-Place Pod Resize v1.32 (beta) Update In-Place Pod Resize docs for v1.32 Nov 27, 2024
@sftim
Copy link
Contributor

sftim commented Nov 27, 2024

Seems OK to unhold

If that's wrong, we can revert the change.
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 27, 2024
@sftim
Copy link
Contributor

sftim commented Nov 27, 2024

nit cleanup PRs welcome!

@k8s-ci-robot k8s-ci-robot merged commit c4199a6 into kubernetes:dev-1.32 Nov 27, 2024
6 checks passed
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. area/blog Issues or PRs related to the Kubernetes Blog subproject 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. sig/node Categorizes an issue or PR as relevant to SIG Node. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Development

Successfully merging this pull request may close these issues.