Is it possible to use Kubernetes Cluster Autoscaler to scale nodes if number of nodes hit a threshold?

9/13/2019

I created an EKS cluster but while deploying pods, I found out that the native AWS CNI only supports a set number of pods because of the IP restrictions on its instances. I don't want to use any third-party plugins because AWS doesn't support them and we won't be able to get their tech support. What happens right now is that as soon as the IP limit is hit for that instance, the scheduler is not able to schedule the pods and the pods go into pending state.

I see there is a cluster autoscaler which can do horizontal scaling.

https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler

Using a larger instance type with more available IPs is an option but that is not scalable since we will run out of IPs eventually. Is it possible to set a pod limit for each node in cluster-autoscaler and if that limit is reached, a new instance is spawned. Since each pod uses one secondary IP of the node so that would solve our issue of not having to worry about scaling. Is this a viable option? and also if anybody has faced this and would like to share how they overcame this limitation.

-- Anshul Tripathi
amazon-eks
amazon-web-services
aws-eks
kubernetes

1 Answer

9/16/2019

EKS's node group is using auto scaling group for nodes scaling.

You can follow this workshop as a dedicated example.

-- Kane
Source: StackOverflow