在 EKS 集群中使用 cluster-autoscaler 是否预期会向 ASG 自动缩放组添加缩放策略?

Is use of cluster-autoscaler in EKS cluster expected to add a scaling policy to ASG autoscaling groups?

我负责组织中的多个 AWS EKS 1.13 集群。在最近一次基础设施成本审计中,我注意到与我的工作节点关联的 ASG 在管理控制台中显示以下内容。

Your Auto Scaling group is configured to maintain a fixed number of instances. Add scaling policies if you want to scale dynamically in response to demand.

我想知道这是否是安装 cluster-autoscaler helm chart 时的预期行为。

我已经创建了具有单个工作节点组的 EKS 集群 运行 1.13。我已经按照文档中的说明安装了 cluster-autoscaler helm chart。

集群自动缩放器图表安装时具有以下图表值。

cloudProvider:      aws                                      
awsAccessKeyID:     {{ requiredEnv "AWS_ACCESS_KEY_ID" }}    
awsSecretAccessKey: {{ requiredEnv "AWS_SECRET_ACCESS_KEY" }}
awsRegion:          {{ .Environment.Values.aws_region }}     
autoDiscovery:                                               
  clusterName:      {{ .Environment.Values.cluster_name }}   
  enabled:          true                                     
rbac:                                                        
  create:           true                                     
sslCertPath:        /etc/ssl/certs/ca-bundle.crt             

我预计 EKS 工作程序节点 ASG 会附加一个策略。这可能是我的误解,因此提出这个问题。

非常感谢您提供的任何信息。

您是 运行 处于自动发现模式的集群自动标量,因此自动标量负责您的 asg 中的实例数。此外,您的自动标量将能够更改您的 asg 中所需的节点数,只要它在您的 asg 上设置的最小最大限制内。

描述中所说的完全正确。此外,请记住,您可以使用 cloudwatch 事件进一步增强集群的扩展性。但是,这将根据您随时间收集的自定义指标来完成。