kubernetes-sigs / cluster-proportional-autoscaler

Kubernetes Cluster Proportional Autoscaler Container
Apache License 2.0
634 stars 131 forks source link

Any way to disable when node(s) are being shutdown? #209

Open boatmisser opened 4 months ago

boatmisser commented 4 months ago

Just a Question, sorry about using Issue.

I was trying to use proportional autoscaler to replicate a Daemonset using a Deployment by having 1 pod per node.

However, during a cluster scaler up (for a large app deployment) and then back down; the proportional autoscaler prevented the removal of nodes, resulting in an ever-larger cluster.

I was just wondering if it's possible to configure so that it does not prevent a node scale down during a cluster autoscale re-balance. E.g. 20 node cluster; deployment causes 4 new nodes; these get a pod due to proportional autoscaler; cluster autoscaler then tries to remove 4 nodes afgter re-balance and can't.

Thanks

kundan2707 commented 4 months ago

/kind support

kundan2707 commented 4 months ago

When pods are evicted during the graceful node shutdown, they are marked as shutdown. Running kubectl get pods shows the status of the evicted pods as Terminated. HPA still considers these pods to be a healthy part of the deployment and will not scale up or down to fulfill the desired state based on the metrics. so there is no need of disabling

kundan2707 commented 3 months ago

@boatmisser was you able to achieve this ?

k8s-triage-robot commented 3 weeks ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale