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
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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.

}

tags = {
Expand Down