使用 eksctl 在同一 AZ 中的多个子网

Multiple subnets in same AZ with eksctl

在eksctl ClusterConfig文件中,如果我在同一个AZ中有多个子网(具有不同CIDR范围的子网)如何映射?

  eu-west-1a:
      id: "subnet-02a3dacfd211d0870"
      cidr: "192.168.32.0/22"
  eu-west-1b:
      id: "subnet-07a7b2710e102cc03"
      cidr: "192.168.36.0/22"
  eu-west-1c:
      id: "subnet-00b560c1f99779a6d"
      cidr: "192.168.40.0/22"
  eu-west-1a:
      id: "subnet-0c5e28e892372ebf4"
      cidr: "192.168.47.0/25"

根据对 eksctl 的松弛通道的讨论,尚不支持每个 AZ 多个子网。来自讨论:

isn't supported currently because that field takes a map which does not permit duplicate keys (availability zones here)

还有一些要求:

https://github.com/weaveworks/eksctl/issues/475#issuecomment-498995479 https://github.com/weaveworks/eksctl/issues/806

eksctl 从 0.32.0 版本开始支持此功能:

eksctl version 0.32.0 introduced further subnet topology customisation with the ability to:

  • List multiple subnets per AZ in VPC configuration

https://eksctl.io/usage/vpc-networking/#custom-subnet-topology