Attach and delete EKS worker nodes whenever required for cost effectiveness

3/27/2019

we have a scenario where we want to stop the cluster (worker nodes) in Night when it is not being used and start it again in the morning when people start using the application running on AWS EKS. Any suggestions will be helpful.

-- Navneet Nandan Jha
aws-eks
eks
kubernetes

1 Answer

3/27/2019

I think you can achieve it by changing the desired capacity of auto scaling group using aws cli. You can run it as a CRON job:

aws autoscaling update-auto-scaling-group --auto-scaling-group-name <my-auto-scaling-group> --desired-capacity 0 --min-size 0

-- Karol Samborski
Source: StackOverflow