Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tags to EKS-related subnets to support discovery for ELB #190

Merged
merged 1 commit into from
Feb 2, 2021

Conversation

vandrijevik
Copy link
Contributor

This PR implements the guidance in https://aws.amazon.com/premiumsupport/knowledge-center/eks-vpc-subnet-discovery/ around how to tag subnets in AWS, so that load balancers created for the purposes of EKS clusters can correctly choose subnets to be associated with.

In particular, the scheme we implement is:

  • In the NAT gateway module, since all the subnets we create are public, we tag them with kubernetes.io/role/elb.
  • In the EKS module, if we are using a NAT gateway (meaning the subnets we create for EKS nodes are private), we tag the subnets with kubernetes.io/role/internal-elb. Otherwise (the subnets we create for EKS are public) we tag the subnets with kubernetes.io/role/elb.

The effect of these tags is that load balancers created by the cloud controller manager (to satisfy Service objects with type: LoadBalancer) or the ALB ingress controller are placed in the appropriate subnets. For us, at the time of this writing all load balancers are public, so we expect them to be created in the subnets tagged with kubernetes.io/role/elb.

@vandrijevik vandrijevik requested a review from a team as a code owner February 1, 2021 17:38
@vandrijevik vandrijevik requested a review from rdunlop February 1, 2021 17:41
@vandrijevik vandrijevik merged commit d9c8204 into master Feb 2, 2021
@vandrijevik vandrijevik deleted the va-add-elb-tags-to-eks-subnets branch February 2, 2021 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants