-
Notifications
You must be signed in to change notification settings - Fork 584
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
NLB support #3088
Comments
@carlosonunez: This issue is currently awaiting triage. If CAPA/CAPI contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Thanks for bringing this up @carlosonunez There is an ongoing test to see how to deal with hairpinning issue comes with NLBs (when LB directs Kubelet traffic to the api-server on the same node). |
That's great that this is being tracked elsewhere! I couldn't find any issues pertaining to it and thought "That can't be right!" :) |
Any update on whether this truly is being tracked? thanks |
I haven't seen issue tracking NLB support, but we considered using NLB back in 2018: #115 (comment) |
For reference, CAPZ also has a hairpinning issue, although specifically when using an internal load balancer: kubernetes-sigs/cluster-api-provider-azure#1033 (comment). The current workaround is to prevent requests from kubelet on the control plane machines from going through the LB, by resolving NLB DNS record to 127.0.0.1. |
I could not find a specific issue for this, I see this was discussed in CAPA v1alpha4 API changes document but during today's office hours, we triaged this issue and keeping this issue. |
Thanks @dlipovetsky, good to know there is an example workaround. If I can't make it work by disabling client IP preservation, this might be the way to go. |
As suggested by @sedefsavas, changing the target group type from instance to IP, can also workaround this issue https://aws.amazon.com/premiumsupport/knowledge-center/target-connection-fails-load-balancer/ Update |
Just a correction on retirement of Classic load balancers mentioned in the issue: EC2 Classic Networking is being retired not the Classic Load Balancers. TL;DR August 2022 retirement date is not for Classic ELBs. |
UPDATE: Never mind. This deprecation only applies to ELBs in EC2-Classic, as @sedefsavas said. It's a bit confusing since this article recommends migrating to ELBv2 resources.
The language is SUPER confusing, but according to this AWS article, ELBs (aka Classic LBs) are in scope for retirement as well: https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/migrate-classic-load-balancer.html#migrate-step-by-step-classiclink
…On Feb 17, 2022, 01:59 -0600, sedefsavas ***@***.***>, wrote:
Just a correction on retirement of Classic load balancers mentioned in the issue:
EC2 Classic Networking is being retired not the Classic Load Balancers.
Classic Load Balancers that are being used in EC2 Classic networking will need to be migrated to an LB in a VPC. If Classic Load Balancers are already in a VPC, they won't be affected.
TL;DR August 2022 retirement date is not for Classic ELBs.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
This feature(NLB for control-plane) is very much required in the market irrespective of the CLB still being there. |
Are we planning to convert the existing Classic ELBs to NLBs? |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
While implementing this, we can avoid introducing the problem of creating LBs with identical names for clusters created with same name in different namespaces: #969 NLB names need to be unique in the same AWS account and region. |
Hmm, I mean, generally having multiple clusters in the same VPC will end up with that cluster be able to access other clusters on the same network sort of, right? |
Just wondering if you're over-rotating on something that shouldn't be considered a problem -- what is the concern with something going straight to the EC2 instance's port 6443? It's not being advertised, and even if something did hit it directly it's the same security as if it went through the NLB. There is nothing magical happening at the NLB to shape or modify that traffic, the NLB is effectively some iptables magic itself to handle load balancing and forwarding the proper traffic. |
@voor Right. However, opening up 6443 to the world is a bit of a stretch, isn't it? :) Even if it isn't advertised. And yes, NLB is just some traffic routing magic it doesn't modify the request at all. But you still would want some amount of security regarding traffic coming to a port. You generally don't open any ports to the outside world. |
BTW, on it being public. With ipv6 there are no private addresses. So this because a moot point. If you use an IPv6 VPC the port will, "technically" be open to the world anyways. |
@voor I get what you are saying, the reason I need the port opened is that right now it only has it open for a security group as a source. Which doesn't work with the NLB. But yes, since the node is in a private network, opening it to For example, I'm not sure / don't know if you can have control plane nodes in public networks if you so choose. |
You can technically have control plane nodes in public subnets if you bring your own cluster. I'm saying technically only because it's not really advised... :D |
Successfully created an NLB. Now, lots of testing remaining and making it work with IPv6. ( that shouldn't be a problem. :) ) |
I'm just wondering (if opening to |
The NLB doesn't really have an internal IP OR it's constantly changing. So that would be a difficult manner. However, since the NLB is part of the VPC, it's enough to add the VPC CIDR to the security group. That way, any IP that the NLB will get will be allowed, and at the very least, it's not And yes, that seems to be the consensus when dealing with NLBs since they don't have security group attachments similar to NAT gateways. It's a Layer 4 load balancer. Historically though, as I've read in many forums by AWS employees, there is no REAL reason that they couldn't make it work with security groups; it's a deliberate decision. Which we have no privy to, sadly. :) |
Ah, sure. On a side note: @Skarlso, thanks so much for your quick replies and that you are driving this forward. Awesome! 👍 |
No problem. :) I like working on this issue. :D It's very complex. :)
I'm not a 100% sure yet to be honest. I don't see with what IP address the nlb tries contacting the instance. If it's using preservation I'm not sure which client ip it preserves. |
Incidentally, that might be the cause of my current problem. Namely that the instance is not joining the cluster. Or more precisely, it looks like kubelet is failing to start up. |
BOOM
|
Okay, so this work in one of two ways: Either:
What I'm going to do is, create a parameter/switch that lets the user control this behaviour. Is that okay? |
Ah ok. So with client IP preservation on you must open it up for |
Correct. 👍 |
Ok, got it. One naive thought: So instead of prematurely opening it up completely for Though, this would depend on a Service of type |
This is correct. Without opening it up the node will not join the cluster and kubelet will fail with various errors or things that it can't reach. Some of which MIGHT be the hair pinning issue which I'm investigating. For example just this:
Looks very suspiciously like a hair pinning issue where kubelet can't access the node using its domain name. |
Okay, so I got something working for now. I'm going to roll with that, then iterate over the possible hair pinning issue. |
So I tried the
So for now, I'm staying with my solution. FFW the network loadbalancer doc troubleshoot section also says that we should disable preserve client ip if hairpinning is an issue. |
Does it set the X-Forwarded-For request header or X-Real-Ip header? That way audit logs will still have the client IP somewhere. This is extremely unlikely since nlb is layer4 and headers are layer 7 |
It does, yes. |
Ah, yeah, I misread the doc. You're right @voor it does not set that header. Something else does if client ip preservation is on. |
Just out of interest, as it's seems not be tracked in a milestone. I assume it won't be part of the v2.0.0 milestone?! |
Probably not, because the PR needs reviews, tests, etc. That won't happen now, the team is pushing for 2.0.0 milestones and fixes now. Sorry! :/ |
Sure, no worries 🙂. Totally understandable. Just noticed that 2.0.0 is about to be released soon, so I thought I ask. Really nice that 2.0.0 is coming, even though without NLB 🙂 Unfortunately, I'm not too deep into the code base but I would also take a look at the PR (this should not block any further changes etc. :) next week, latest. |
There are two hanging things:
But I could consider this closed. Please test and see if anything is missing / not working. :) |
/kind feature
Describe the solution you'd like
[A clear and concise description of what you want to happen.]
As an engineer looking to deploy Kubernetes with CAPA
I would like my control plane to be fronted by a Network Load Balancer instead of Classic ELBs
So that I can continue to use CAPA after AWS deprecates them
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Classic ELBs are getting deprecated in August 2022, and AWS SDK for Go supports NLBs. We should use them!
More info here
The text was updated successfully, but these errors were encountered: