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

Adopting existing NLBs/TargetGroups that point towards host network pods #3681

Open
fvlaicu opened this issue May 8, 2024 · 4 comments
Open

Comments

@fvlaicu
Copy link

fvlaicu commented May 8, 2024

Is your feature request related to a problem?

We're looking to use the AWS lb controller to manage load balancers on our Kubernetes fleet.
Our ingress pods run in the host network and receive the traffic directly from the NLB.
To be more clear, we add the AWS instances to the target group and send traffic to the ports on which the ingress pods run.
I would like the ability to adopt/import the existing NLBs/TargetGroups as is.

Describe the solution you'd like
A description of what you want to happen.

I would like to have a way for the instances that run the ingress pods to be added to the target group without the use of node ports (since the pods are already in the host network).

Describe alternatives you've considered
A description of any alternative solutions or features you've considered.

@csantanapr
Copy link
Member

Did you try using the TargetGroupBinding ?

With targetType: instance should allow you to point to the instance port

@M00nF1sh
Copy link
Collaborator

M00nF1sh commented May 9, 2024

@fvlaicu the answer provided by fvlaicu is correct, you should use TargetGroupBinding on existing NLB/TargetGroups.

We don't have plans to officially support "adopt" existing resources for Ingress/Services at the moment. Though technically you can hack it by attach required aws tags to existing AWS resource to cheat the controller thus it believe those resources are created by it and use them

@fvlaicu
Copy link
Author

fvlaicu commented May 10, 2024

I tried earlier to use a loadbalancer type service, however, that changed the target group and added node ports.

@M00nF1sh
Copy link
Collaborator

@fvlaicu
You need to apply aws tags to existing targetGroups/security groups as well for the lbc to adopt it

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