Skip to content

Conversation

@Karthik-K-N
Copy link

  • One-line PR description: Node Resource Hot-Unplug
  • Other comments:

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 30, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Karthik-K-N
Once this PR has been reviewed and has the lgtm label, please assign dchen1107, jpbetz for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory 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. labels Sep 30, 2025
@Karthik-K-N
Copy link
Author

This KEP is follow up on Node Resource Hot Plug .
It is assumed that by the time this KEP is worked on Kubernetes is already have Node Resource Hotplug support.
Will keep on updating this KEP based on the feedback received for this KEP as well as the Node Resource Hot Plug KEP. Thanks

@Karthik-K-N Karthik-K-N mentioned this pull request Sep 30, 2025
4 tasks
@marquiz
Copy link
Contributor

marquiz commented Sep 30, 2025

/cc

## Alternatives

Scale down the cluster by removing compute nodes.

Copy link
Member

@lmktfy lmktfy Nov 20, 2025

Choose a reason for hiding this comment

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

Maybe there's also an option to uninstall the kubelet, delete the associated Node, and re-register?

Not a good idea, but it is an alternative.

### Troubleshooting

###### How does this feature react if the API server and/or etcd is unavailable?

Copy link
Member

Choose a reason for hiding this comment

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

Hot unplug will trigger writes to Node .status, I imagine.


Monitor the metrics

- node_hot_unplug_request_total
Copy link
Member

Choose a reason for hiding this comment

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

Do these have dimensions / labels (eg to distinguish CPU unplugs from memory)?

# List the feature gate name and the components for which it must be enabled
feature-gates:
# none, this is in the e2e test framework
- name: NodeResourceHotUnPlug
Copy link
Member

Choose a reason for hiding this comment

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

nit: I'd use a lowercase p.

### Non-Goals

* Dynamically adjust system reserved and kube reserved values.
* Update the autoscaler to utilize resource hotplug.
Copy link
Member

Choose a reason for hiding this comment

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

nit: we have more than one autoscaler (actually about seven)


Downgrade

It's always possible to trivially downgrade to the previous kubelet.
Copy link
Member

Choose a reason for hiding this comment

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

If I have hot unplugged half my CPUs and then downgrade the kubelet, what happens? If it's all fine, why is it all fine?


### Version Skew Strategy

Not relevant, As this kubelet specific feature and does not impact other components.
Copy link
Member

Choose a reason for hiding this comment

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

Why doesn't a hot unplug result in a write to the Node? I think people will expect that the .status reflects the Node's resource availability.


###### How can an operator determine if the feature is in use by workloads?

This feature will be built into kubelet and behind a feature gate. Examining the kubelet feature gate would help in determining whether the feature is used. The enablement of the kubelet feature gate can be determined from the kubernetes_feature_enabled metric.
Copy link
Member

Choose a reason for hiding this comment

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

We can mention flagz.


###### Will enabling / using this feature result in any new API calls?

No, It won't add/modify any user facing APIs. Internally kubelet runs the pod-readmission.
Copy link
Member

Choose a reason for hiding this comment

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

I think it should result in writes to the status subresource of the associated Node.

Without doing that, the scheduler(s) will make incorrect placement decisions.

## Motivation

Node Resource Hotplug provides the ability to increase the resources of a cluster on demand without any downtime during a surge of resource usages by workloads
Now with Node resource hot-unplug the motive is to remove the resources when not needed for cost optimisation without any downtime.
Copy link
Member

Choose a reason for hiding this comment

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

Is this purely about cost optimization?

I think this could be used to respond to hardware degradation too, or even as a way for a bare-metal node to prepare for an in place hardware upgrade.

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

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants