EKS 自动缩放器 HA 配置

EKS autoscaler HA configuration

我有以下配置:

当我更改 POD spec/config 我看到下一个:

是否有正确的方法来配置自动缩放器以在不同的 2 个可用区中创建 instances/pods?

这有两个层次。集群自动缩放器实例位置,然后是 kubernetes pod 位置。

为每个可用区创建一个 Auto Scaling 组:

  • Cluster autoscaler does not support Auto Scaling Groups which span multiple Availability Zones; instead you should use an Auto Scaling Group for each Availability Zone and enable the --balance-similar-node-groups feature. If you do use a single Auto Scaling Group that spans multiple Availability Zones you will find that AWS unexpectedly terminates nodes without them being drained because of the rebalancing feature.

然后对于kubernetes,使用pod anti-affinity on the EKS populated failure-domain.beta.kubernetes.io/zone label.

EBS 卷不跨越可用性区域,因此如果您使用持久卷,您可能会在一个区域中遇到 pods 或最坏情况 pods 无法安排。