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?

ignacio
已提問 4 個月前檢視次數 788 次
2 個答案
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

已回答 4 個月前
profile picture
專家
已審閱 2 個月前
  • 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
已回答 4 個月前
profile picture
專家
已審閱 2 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南