Hello, I have an issue with eks autoscaling. I cre...
# aws
Hello, I have an issue with eks autoscaling. I create the cluster with default auto scaling like so:
Copy code
return new eks.Cluster(
    name: getClusterName(),
    vpcId: vpc.id,
    publicSubnetIds: vpc.publicSubnetIds,
    privateSubnetIds: vpc.privateSubnetIds,
    nodeAssociatePublicIpAddress: false,
    instanceType: 'c5.xlarge',
    nodeRootVolumeSize: 50,
    desiredCapacity: 3,
    minSize: 2,
    maxSize: 8,
but when I add a deployment it does not increase the number of nodes. Is there something to do to have autoscaling working when using the cluster default nodegroup?
It's unlikely that a single Deployment is going to cause the autoscaler to kick-in. The default auto scaler monitors for pods that fail to schedule and will react by adding new nodes.
You can test this by adding resource requests to your deployment that are large and scale the deployment to 12, 20, or 50 replicas and it should encourage autoscaling
Typically you would need to deploy something like cluster-autoscaler as well, no? I don't believe that EKS installs it for you, just that the node groups have the right labels automatically
@quiet-wolf-18467 yes I already had an existing deployment. I have a pod which is in
state and cluster indicates ‘insufficient cpu’
there is an autoscaling group created by pulumi when I create the cluster. But it does not kick in when needed.
I do nothing special, no idea about what is wrong.
As Itay mentioned you need to install also cluster-autoscaler.
ok thanks, is it mentioned somewhere in the pulumi docs?
I mean if it’s not the case, it’s a big missing block
This is more a function of Kubernetes and how you would do autoscaling than it is with Pulumi. You’d have the same issue if you provisioned an EKS cluster with Terraform or CloudFormation.
yes but what is the point of indicating minSize, maxSize, and desiredCapacity if there is not autoscaling ?
These are the arguments to the AWS auto-scaling groups (the thing that back EKS’ node groups). But there needs to be a signal to the autoscaling group, which in this would come from cluster-autoscaler (or something like Karpenter if you wanted something else).
👍 1
I found this. Too bad there is not the same thing in ts 🙂 https://github.com/jaxxstorm/pulumi-clusterautoscalerx/blob/master/main.go
but it gives a pretty good idea