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

VPC: Add private subnet tag for alb #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

GrigorovskyA
Copy link

Regarding: https://aws.amazon.com/ru/premiumsupport/knowledge-center/eks-vpc-subnet-discovery/

AWS LoadBalancer Controller requires "kubernetes.io/role/internal-elb" tag on a private subnet

main.tf Outdated
@@ -48,6 +48,7 @@ module "vpc" {
private_subnet_tags = {
Name = "${var.environment}-${var.cluster_name}-private"
"kubernetes.io/cluster/${var.cluster_name}" = "shared"
"kubernetes.io/role/internal-elb" = ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Key: kubernetes.io/role/internal-elb
Value: 1
This tag is required if you want to use not all networks, only those that have this tag. It is necessary only if your architecture includes dedicating instances for ingress or some specific case. By default, we don't need to add this, but a good point to get the ability to set this if required. Maybe add some variables for this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akastav
Apparently this tag affects AWS LB Controller subnet discovery, and it is described both in AWS docs and the AWS LB Controller docs.
We are struggling now with internal facing ingresses not being able to detect usable subnet.

There is a similar tag in the code but the word ordering is confused:

  private_subnet_tags = {
    Name                                        = "${var.environment}-${var.cluster_name}-private"
    "kubernetes.io/role/elb-internal"           = "1"
    "kubernetes.io/cluster/${var.cluster_name}" = "owned"
  }

while it should be kubernetes.io/role/internal-elb. The value itself doesn't seem to make any difference, either "" or "1" should work the same.

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.

4 participants