kedacore / keda

KEDA is a Kubernetes-based Event Driven Autoscaling component. It provides event driven scale for any container running in Kubernetes
https://keda.sh
Apache License 2.0
8.5k stars 1.08k forks source link

Targeted Pod Removal During Scaling Down #6124

Open milad2golnia opened 2 months ago

milad2golnia commented 2 months ago

Proposal

I’m looking for a way to determine which pod to remove when scaling down. Assume we have three pods: A, B, and C. I want to scale down by specifically removing pod B. Does KEDA provide an option for this?

Use-Case

This is highly useful in many scenarios. I think the pod-deletion-cost issue is related to this feature, and with it, we could handle pod-deletion-cost programmatically. It also seems that the Scaling down logic discussion is requesting this feature, but the author forgot to submit a feature request.

In general, this is useful when we want to remove idle pods rather than a random pod.

Is this a feature you are interested in implementing yourself?

No

Anything else?

No response

JorTurFer commented 2 months ago

Hello, Sadly KEDA doesn't provide any option to handle this as we rely on the HPA controller and it's the HPA controller the responsible of handling the scaling on k8s side

milad2golnia commented 2 months ago

@JorTurFer Thank you for your response. It was very helpful. You can close the issue if you believe it's outside the scope of KEDA. However, I suggest adding a note in the documentation, as others seem to have encountered the same question, as I mentioned in my issue.

JorTurFer commented 2 months ago

However, I suggest adding a note in the documentation, as others seem to have encountered the same question, as I mentioned in my issue.

This can be nice! Are you willing to open a PR to docs repo? https://github.com/kedacore/keda-docs

milad2golnia commented 2 months ago

Thank you! I'd love to contribute when I have the time. I'll keep the PR to the docs repo in mind and will try to open one as soon as my schedule allows.

stale[bot] commented 3 days ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.