How to stop AWS EKS Worker Instances

7/16/2019

I wonder if that would be possible to temporary stop the worker VM instances so they are not running at night time when I am not working on a cluster development. So far the only way I am aware of to "stop" the instances from running is to delete the cluster itself which I don't want to do. Any suggestions are highly appreciated.

P.S. Edited later

The cluster was created following steps outlined in this guide.

-- alphanumeric
amazon-web-services
cluster-computing
eks
kubernetes

2 Answers

5/28/2020

Edit the autoscaling group and set the instances to 0. This will shut down all worker nodes. Now you can use AWS Automation to schedule a repetitive action through automation documents that will be stopping/starting at given periods of time. You can't stop the master nodes as they are managed by AWS.

-- anVzdGFub3RoZXJodW1hbg
Source: StackOverflow

3/1/2020

I'm just learning myself but this might help. If you have eksctl installed, you can use it from the command line to scale your cluster. I scale mine down to the min size when I'm not using it:

eksctl get cluster
eksctl get nodegroup --cluster CLUSTERNAME
eksctl scale nodegroup --cluster CLUSTERNAME --name NODEGROUPNAME --nodes NEWSIZE
-- jrk
Source: StackOverflow