-
Notifications
You must be signed in to change notification settings - Fork 443
Don't create outbound LB if nat-gateway is enabled #1587
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
Comments
@jackfrancis Jack, can you please explain how we'll able to define multiple node-pools that each pool will have a dedicated output IP? This is required when the cluster needs to handle more than 64K outbound ports and, thus, more than a single NAT Gateway is needed. |
Because a NAT Gateway is a child property of a subnet, we'd need to support creating per-pool subnets, each with its own NAT Gateway. @CecileRobertMichon @devigned is it possible to create multiple subnets, and assign specific node pools (i.e., |
Support was added in #1411, it's available in the latest CAPZ release |
So, no LB configuration is needed? |
To clarify, the buggy behavior is that when you build a cluster with this template, you should only get a NAT Gateway to handle outbound SNAT: Specifically, this declaration says "use NAT gateway to handle outbound SNAT for this node pool": What we see instead is that a Load Balancer specifically for handling outbound outbound SNAT is created in addition to the NAT Gateway. To summarize, what's happening is that the decision whether or not to create the Outbound Load Balancer is based on the presence of a non-empty string 'Name' value of the subnet's NatGateway resource: And we discovered that the way we're introspecting the NAT Gateway resource from the Azure API in fact produces an empty string Name value in the cluster-api spec, thus guaranteeing that the Outbound Load Balancer will always be created. |
/kind bug
What steps did you take and what happened:
[A clear and concise description of what the bug is.]
Building a cluster w/ only natgateway "node" subnets included an outbound LB w/ the nodes in the backend pool
What did you expect to happen:
The natgateway resource itself handles outbound connections from nodes, so the outbound LB is superfluous (and in fact constrains the node scale, as we run out of outbound SNAT ports quickly compared to natgateway).
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version
): 1.21.3 (should repro for all versions)/etc/os-release
):The text was updated successfully, but these errors were encountered: