Part 5: Scaling
What Will You Do¶
In this part, you will scale the EKS Cluster to zero worker nodes. This will allow you to save on AWS cloud costs such as over a weekend or at night when the worker nodes are not required.
Update Cluster Spec¶
Update the EKS cluster specification file (eks-gpu.yaml) with the following changes for both the Regular and GPU node groups.
GPU Node Group¶
<deleted text>
managedNodeGroups:
- amiFamily: AmazonLinux2
desiredCapacity: 0
iam:
withAddonPolicies:
albIngress: true
autoScaler: true
efs: true
externalDNS: true
imageBuilder: true
instanceType: g4dn.xlarge
<deleted text>
Regular Node Group¶
<deleted text>
desiredCapacity: 0
iam:
withAddonPolicies:
albIngress: true
autoScaler: true
efs: true
externalDNS: true
imageBuilder: true
instanceType: t3.large
<deleted text>
Scale to Zero¶
Now, you will use the RCTL CLI to apply the updated cluster specification from the previous step.
rctl apply -f eks-gpu.yaml
You should see a response like the following:
{
"taskset_id": "7kr1r2l",
"operations": [
{
"operation": "NodegroupScaling",
"resource_name": "t3-nodegroup",
"status": "PROVISION_TASK_STATUS_PENDING"
},
{
"operation": "NodegroupScaling",
"resource_name": "gpu-nodegroup",
"status": "PROVISION_TASK_STATUS_PENDING"
}
],
"comments": "The status of the operations can be fetched using taskset_id",
"status": "PROVISION_TASKSET_STATUS_PENDING"
}
In a few minutes, you should see all the worker nodes in the cluster spin down.
Scale Up¶
When you need the worker nodes back, update the same entries in the cluster specification and apply the file using RTCL. The EKS cluster will automatically scale back to the requested number of worker nodes.