eksctl
eksctl copied to clipboard
[Feature] EKSCTL can create scheduled scaling rules
What feature/behavior/change do you want?
I would like to be able to control Auto Scaling Groups
created by EKS
with eksctl
. We use a Scheduled Scaling
a part of ASG
to scale down the clusters after work hours to reduce cost It would be nice if we could include the scaling rules inside of the yaml.
Why do you want this feature?
It would be able to track these rules as infrastructure as code.
Hello kderck :wave: Thank you for opening an issue in eksctl
project. The team will review the issue and aim to respond within 1-3 business days. Meanwhile, please read about the Contribution and Code of Conduct guidelines here. You can find out more information about eksctl
on our website
Plus 1 on this - having the ability to apply scheduled scaling rules within eksctl can allow us to program scaledown events for dev clusters to save money.
Hi all, any updates on this? Applying it manually after cluster creation is not an effective manner. It would save us a lot of money and overhead
Hi, why don't you use cluster autoscaler https://github.com/kubernetes/autoscaler? You can still set a maximum in the ASG group. Does aws provides cheaper EC2 instances using a Scheduled Scaling?
Hi @bcoromina the Cluster Autoscaler
communicates with the EC2
Auto Scaling Group
to scale up, or to scale down. The Cluster Autoscaler
does this by making requests to the Auto Scaling Group API
. There is no option in the Cluster Autoscaler
to scale down to 0
at specific times. The reason we want to scale down to this is so we can safe cost by turning nodes off overnight and turning them on in the morning to safe cost.
If you want to force instance to 0 at specific time and ignore the possible activity that makes sense.
Hey @Himangini This seems like a good new addition to eksctl. I'd like to take a stab at it.
@hassaanakram Ty for showing interest in contributing to eksctl
🎉 . Please feel free to open a PR, we're happy to review it ✨ Here's the contributing guide to get you started 👍🏻
Hi @Himangini
I have some questions, but before that some context:
Scheduled Scaling action is a property of the Auto scaling group and therefore the ASG must exist before Scheduled Scaling rules may be applied. Therefore, the Scheduled Scaling resource cannot be added to the NodeGroup CloudFormation template and must come after the NodeGroup ASG creation.
I can see two ways to do that (after node group creation)
- Create a new stack for the Scheduled Scaling Config as a sequential task after NG creation (right now, I have implemented this)
- Use https://github.com/weaveworks/eksctl/blob/0a5bae44cda1a58bb3410f9949a81090c6d8eb12/pkg/awsapi/autoscaling.go#L476 as a sequential task
I am not really sure which is the idiomatic way to move forward here. Your input will be appreciated. Thanks!
Draft PR for ref: https://github.com/weaveworks/eksctl/pull/6732