By using AWS re:Post, you agree to the AWS re:Post Terms of Use

EKS Node groups and auto scaling groups

0

Im working with Amazon Elastic Kubernetes Service and created a testing node group to check the behavior if the node runs out of cpu or ram. I thought that since AWS creates an autoscaling group related to that node group it would scale automatically (1 node desired, 1 node minimum and 3 maximum, i thought that it would scale to 3 nodes automatically), but this doesnt seems to work and you have to configure Karpenter or Cluster Autoscaler.

Why this configuration exists and why it creates an autoscaling group for?

2 Answers
1
  • When you create an EKS node group, AWS does create an associated Auto Scaling group to manage the cluster's worker nodes. However, the Auto Scaling group on its own will not automatically scale the node count in response to changing resource demands on the nodes.

  • The Auto Scaling group handles the low-level node provisioning/termination but does not include the auto-scaling logic to scale proactively. Tools like Karpenter or the Cluster Autoscaler are needed to monitor the resource usage of the nodes and instruct the Auto Scaling group to scale up or down nodes as needed.

  • The Auto Scaling group exists primarily to simplify node management operations for EKS - it takes care of launching new nodes when you want to scale out manually. But on its own, it does not scale automatically based on load.

  • Karpenter and Cluster Autoscaler both integrate with the Kubernetes API to monitor pods/nodes and have scaling logic/policies to determine when an scale operation is required. They then call the Auto Scaling group APIs to adjust the node count.

I hope this helps explain why additional auto-scaling tools are needed along with the Auto Scaling group when using EKS node groups!

For reference - https://docs.aws.amazon.com/eks/latest/userguide/autoscaling.html

Let me know if any part needs more clarification.

Thanks,

Abhinav

answered a year ago
profile picture
EXPERT
reviewed 8 months ago
  • I see. But whats the difference between an autoscaling group policy (it will scale automatically based on cpu usage for example) vs karpenter or cluster autoscaler?

1

Hello,

  • Karpenter and Cluster Autoscaler can adjust the number of pods at the node level, in a Kubernetes cluster by adding or removing nodes. They assess the resource requests and limits of pods compared to node capacity to determine if additional nodes are necessary.
  • Unlike Auto Scaling, which manages groups of predefined instance types Karpenter and Cluster Autoscaler can utilize a variety of instance types and sizes based on the requirements of each pod.
  • Cluster autoscalers integrate with Kubernetes allowing them to understand workload demands and efficiently schedule pods. This enables scaling compared to waiting for new instances to be provisioned from an Auto Scaling group. Thanks
answered a year ago
profile picture
EXPERT
reviewed 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions