Skip to content

Incomplete info in Auto Mode Subnet selection for Pods #1088

@berry2012

Description

@berry2012

There is no mention of considerations for availability zones when configuring podSubnetSelectorTerms and podSecurityGroupSelectorTerms to implement Subnet selection for Pods in EKS Auto Mode.

Doc: https://docs.aws.amazon.com/eks/latest/userguide/create-node-class.html#pod-subnet-selector

In the sample spec given in the doc, if specific node subnet is configured and in an AZ, say AZ-A, and a specific pod subnet is configured in an AZ, say AZ-B, then you'd face the issue "aws-cni" failed (add): add cmd: failed to assign an IP address to container.

  # Subnets for EC2 instances (nodes)
  subnetSelectorTerms:
    - tags:
        Name: "node-subnet"   # <--- Auto mode will provision ENIs for pods in an AZ which matches the node-subnet AZ
        kubernetes.io/role/internal-elb: "1"

  # Separate subnets for pods
  podSubnetSelectorTerms:
    - tags:
        Name: "pod-subnet" # <---A matching subnet in an AZ, the same as node-subnet AZ must exist in the VPC
        kubernetes.io/role/pod: "1"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions