AWS EKS Cluster Autoscaler - Scale-In Policy

4/3/2019

I've a CA (Cluster Autoscaler) deployed on EKS followed this post. What I'm wondering is CA automatically scales down the cluster whenever at least a single pod is deployed on that node i.e. if there are 3 nodes with the capacity of 8 pods, if 9th pod comes up, CA would provision 4th nodes to run that 9th pod. What I see is CA is continuously terminating & creating a node randomly chosen from within the cluster disturbing other pods & nodes.

How can I tell EKS (without defining minimal nodes or disabling scale-in policy in ASG) to not to kill the node having at least 1 pod running on it. Any suggestion would be appreciated.

-- Janshair Khan
autoscaling
aws-eks
kubernetes

1 Answer

4/4/2019

You cannot use pod as unit. CA work with resources cpu and memory unit.

If the cluster does not have enough cpu or memory it add one new.

You have to play with your requests resources (in the pod definition) or redefine your node to take an instance type with more or less resources depending how many pod you want on each.

Or you can play with the param scale-down-utilization-threshold

https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-the-parameters-to-ca

-- Darkjeff
Source: StackOverflow