Skip to content

Commit

Permalink
Update blog post
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinay Kulkarni authored and vinaykul committed Apr 1, 2023
1 parent a4fed14 commit 5f6bb51
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ date: 2023-04-04
slug: in-place-pod-resize-alpha
---

**Author:** Vinay Kulkarni
**Author:** Vinay Kulkarni (Kubescaler Labs)

Kubernetes v1.27 brings a new alpha feature that allows users to resize CPU
and memory resources allocated to pods without restarting them. The `resources`
Expand All @@ -25,8 +25,8 @@ Besides the aforementioned resize policy in the pod's spec, a new field named
This field reflects the node resources allocated to the pod's containers.

In addition, a new field called `resources` has been added to the container's
status. This field reflects the actual resource requests and limits that are
configured on the running containers as reported by the container runtime.
status. This field reflects the actual resource requests and limits configured
on the running containers as reported by the container runtime.

Lastly, a new field named `resize` has been added to the pod's status to show the
status of the last requested resize. A value of `Proposed` is an acknowledgement
Expand All @@ -42,7 +42,7 @@ resize exceeds the maximum resources the node can ever allocate for a pod.

## When to use this feature

Below are a few examples where this feature may be useful:
Here are a few examples where this feature may be useful:
- Pod is running on node but with either too much or too little resources.
- Pods are not being scheduled do to lack of sufficient CPU or memory in a
cluster that is under-utilized.
Expand All @@ -54,7 +54,8 @@ the nodes can be moved.
## How to use this feature

In order to use this feature in v1.27, the `InPlacePodVerticalScaling`
feature gate needs to be enabled.
feature gate must be enabled. A local cluster with this feature enabled
can be started as shown below:

```bash
root@vbuild:~/go/src/k8s.io/kubernetes# FEATURE_GATES=InPlacePodVerticalScaling=true ./hack/local-up-cluster.sh
Expand Down Expand Up @@ -93,6 +94,12 @@ Alternatively, you can write to the default kubeconfig:

```

Once the local cluster is up and running, Kubernetes users can schedule pods
with resources and resize the pods via kubectl. An example of how to use this
feature is illustrated in the following demo video.

[![](in-place-pod-resize-demo.png)](https://youtu.be/lYlNfispQBs)


## Example Use Cases

Expand All @@ -119,7 +126,32 @@ values at the time of pod creation, and can resize down to normal running
needs once the application has finished initializing.


## Credits

This feature is a result of the efforts of a very collaborative Kubernetes community.
Here's a little shoutout to just a few of the many many people that helped shape
this work.
- @thockin for detail-oriented API design and air-tight code reviews.
- @derekwaynecarr for simplifying the design and thorough API and node reviews.
- @dchen1107 for bringing vast knowledge from Borg and helping us avoid pitfalls.
- @ruiwen-zhao for adding containerd support that enabled full E2E implementation.
- @mikebrow @marosset for reviews on short notice that helped CRI changes make it into v1.25.
- @bobbypage for invaluable help getting CI ready and quickly investigating issues.
- @wangchen615 for implementing comprehensive E2E tests and driving scheduler fixes.
- @Random-Liu for thorough kubelet reviews and identifying problematic race conditions.
- @mrunalp for reviewing cgroupv2 changes and ensuring clean handling of v1 vs v2.
- @Huang-Wei, @ahg-g, @alculquicondor for helping get scheduler changes done.
- @SergeyKanzhelev for shepherding various issues during the home stretch.
- @dashpole for bringing me up to speed on 'the Kubernetes way' of doing things.
- @bsalamat for thoughtful design suggestions that simplified the implementation.
- @dims for being omnipresent and helping make merges happen at critical hours.
- Docs and release teams for helping put the finishing touches on this effort.

And a big thanks to my very supportive management Dr. Xiaoning Ding (ByteDance) and
Dr. Ying Xiong for their patience and encouragement.


## References

TBD-placeholder
TODO: Link to official documentation page

0 comments on commit 5f6bb51

Please sign in to comment.