Skip to content

KEP-5982: ReplicaSet Consolidation-Aware Scale-In Strategy#6019

Open
nathangeology wants to merge 2 commits intokubernetes:masterfrom
nathangeology:kep-5982-placeholder
Open

KEP-5982: ReplicaSet Consolidation-Aware Scale-In Strategy#6019
nathangeology wants to merge 2 commits intokubernetes:masterfrom
nathangeology:kep-5982-placeholder

Conversation

@nathangeology
Copy link
Copy Markdown

Provisional KEP for adding a consolidation-aware pod deletion heuristic to the ReplicaSet controller.

Tracking issue: #5982

/sig apps

Placeholder KEP for sig-apps discussion. Adds ConsolidatingScaleDown
feature gate to kube-controller-manager that changes the ReplicaSet
controller's pod deletion sort order to prefer nodes with fewer active
pods during scale-down.

Tracking issue: kubernetes#5982
@k8s-ci-robot k8s-ci-robot added the sig/apps Categorizes an issue or PR as relevant to SIG Apps. label Apr 15, 2026
@github-project-automation github-project-automation Bot moved this to Needs Triage in SIG Apps Apr 15, 2026
@k8s-ci-robot k8s-ci-robot added the kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory label Apr 15, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

Details 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 15, 2026
@k8s-ci-robot k8s-ci-robot requested review from janetkuo and kow3ns April 15, 2026 20:43
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @nathangeology. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 15, 2026
- "@nathangeology"
owning-sig: sig-apps
participating-sigs:
- sig-autoscaling
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

sig-apps too, no?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Does the owning sig need to be in the participating sigs too?


## Summary

Add a `ConsolidatingScaleDown` feature gate to `kube-controller-manager` that changes the ReplicaSet controller's pod deletion sort order during scale-down. When enabled, the controller prefers deleting pods on nodes with fewer total active pods, enabling node autoscalers to reclaim nodes with less disruption.
Copy link
Copy Markdown
Member

@atiratree atiratree Apr 23, 2026

Choose a reason for hiding this comment

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

I think this is an interesting option to consider, but it conflicts slightly with kubernetes/kubernetes#80004. This KEP should clarify where the ConsolidatingScaleDown feature will be placed in the sorting/ranking of the pods. We should also explore the consequences of the various sort/rank order options.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yeah, this would be an alternate heuristic here. The current one is a good one if you do want to spread out pod replicas, but if someone has dynamic capacity and wants to control their compute costs then this proposed heuristic would be really useful. You could imagine other cases (e.g. load-aware or scheduling constraints aware), but then the question is where the 'brain' for parsing through these competing concerns should live. Once you move beyond a simple heuristic change, you probably don't want to do it in the replicaset controller.

Address review feedback from DerekFrank. This KEP affects node
autoscaling (sig-autoscaling, sig-node) and pod scheduling behavior
(sig-scheduling) in addition to the owning sig-apps.
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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. sig/apps Categorizes an issue or PR as relevant to SIG Apps. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

4 participants