EKS 自动缩放器 HA 配置
EKS autoscaler HA configuration
我有以下配置:
- 使用 terraform 模块安装 EKS
https://github.com/terraform-aws-modules/terraform-aws-eks/blob/v4.0.2/examples/basic/main.tf
- 添加了 multi-asg autoscaler
(https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/aws/README.md)
- 配置工作组 运行 每个 az 1 个实例(在 az-1a 和 az-1b 中
和 pod 每个实例)
当我更改 POD spec/config 我看到下一个:
- 创建新实例(2 运行ning)
- 2 pods 处于 运行ning 状态,1 个处于待定状态
- 已创建新实例(3 运行ning)
- 2 pods 处于状态 运行ning(两者年龄更新)
- 2 pods 运行在一个 az
中的实例上
- 2 运行在缩减超时后 1 个可用区中的 ning 个实例
是否有正确的方法来配置自动缩放器以在不同的 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 无法安排。
我有以下配置:
- 使用 terraform 模块安装 EKS https://github.com/terraform-aws-modules/terraform-aws-eks/blob/v4.0.2/examples/basic/main.tf
- 添加了 multi-asg autoscaler (https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/aws/README.md)
- 配置工作组 运行 每个 az 1 个实例(在 az-1a 和 az-1b 中 和 pod 每个实例)
当我更改 POD spec/config 我看到下一个:
- 创建新实例(2 运行ning)
- 2 pods 处于 运行ning 状态,1 个处于待定状态
- 已创建新实例(3 运行ning)
- 2 pods 处于状态 运行ning(两者年龄更新)
- 2 pods 运行在一个 az 中的实例上
- 2 运行在缩减超时后 1 个可用区中的 ning 个实例
是否有正确的方法来配置自动缩放器以在不同的 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 无法安排。