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

[k8s] Shared Backend SecurityGroup for LoadBalancer #3701

Open
vivanov83 opened this issue May 16, 2024 · 4 comments
Open

[k8s] Shared Backend SecurityGroup for LoadBalancer #3701

vivanov83 opened this issue May 16, 2024 · 4 comments

Comments

@vivanov83
Copy link

Hello,
It may sounds like a question, instead of request, but let we see.
What's the problem we ( I ) experience is AWS LBC creates by default backed SG with the following tags:

name: k8s-traffic-<cluster_name>-<hash_of_cluster_name>
tags:
elbv2.k8s.aws/cluster: <cluster_name>
elbv2.k8s.aws/resource: backend-sg

But i didn't find a way how I can add more tags to the BE security group through AWS LBC, with annotation or some additional flag.
Is there a way to do it with some parameter, or these tags can not be controlled outside of the LBC ?

I would like to have an option to add/modify tags to the BE SG provisioned by LBC.

The only alternative for now is to create a script that goes over BE SG and tag them, but as you already know this is not convenient way, since it's very dynamic.

Regards

@vivanov83
Copy link
Author

Update:
Is there a way ingress tags to have precedence over default tags from AWS LBC ?

@oliviassss
Copy link
Collaborator

@vivanov83, current the default tags take the highest priority
Please refer to live doc for more details:
https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.7/guide/ingress/ingress_class/#spectags

@M00nF1sh
Copy link
Collaborator

@vivanov83
The original answer by oliviassss is not accurate.
You can add additional tags to the "shared backend security group" via the --default-tags controller flag.
The result tagging on it will be a combination of tags via "--default-tags" and "elbv2.k8s.aws/cluster: <cluster_name>", "elbv2.k8s.aws/resource: backend-sg".

Note, tags specified via --default-tags will be applied to all other resources as well(alb/nlb/targetGroups/etc)

@oliviassss
Copy link
Collaborator

I meant the tags specified via controller-level flag --default-tags will have the highest priority if tags are specified through controller flag, annotation and ingress class spec. Sorry for the confusion :p

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

No branches or pull requests

3 participants