How do I scale an EKS dev cluster to zero nodes at night?
Scale the managed node groups of a dev/test EKS cluster to zero on a schedule and restore their exact sizes in the morning, without Kubernetes access.
Short answer
Manage the cluster in SnoozeDB and assign Business Hours or a custom hibernation schedule. Outside the window, SnoozeDB saves each managed node group's minimum, desired, and maximum size, suspends the Auto Scaling Launch process, and sets minimum and desired to zero. Inside the window, it restores the saved sizes. The EKS control plane keeps running and billing.
Check eligibility first
- The cluster is ACTIVE, has at least one managed node group, and is in Managed resources.
- Workers run in managed node groups. Clusters with Fargate, EKS Auto Mode, Karpenter, or other unmanaged nodes are refused.
- No
Environment=productionstyle tag (env,environment,snoozedb:env,snoozedb:environment,snoozedb:tag:env, orsnoozedb:tag:environmentset toprodorproduction) and nosnoozedb:enabled=false. - A paid plan or valid trial, and an owner or admin (with MFA when the organization requires it).
Nodes are not drained
Hibernation terminates the nodes without a Kubernetes drain. Pods stop abruptly and stay Pending until nodes return. Use it only on a dev/test cluster that tolerates interruption.
Verify a node group from the AWS CLI
aws eks describe-nodegroup \
--cluster-name dev-cluster \
--nodegroup-name default \
--query 'nodegroup.scalingConfig'
# During hibernation: {"minSize": 0, "maxSize": <unchanged>, "desiredSize": 0}What keeps billing
The EKS control plane, load balancers, NAT gateways, EBS volumes, and public IPv4 addresses continue to cost money. Measure wake-up time before relying on a morning schedule.