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
layer2 mode will use NodePort? #328
Comments
Kubernetes does this automatically, there is no choice. The three service types (ClusterIP, NodePort, LoadBalancer) are supersets of each other. A NodePort service also has an internal cluster IP. A LoadBalancer service also has a NodePort and an internal cluster IP. This is part of the core k8s service logic, MetalLB can't change it even though it doesn't care about the NodePort. |
@danderson how about that if i use the bgp mode, if LoadBalancer must have nodePort, oh that's awful, |
Yes, all k8s LoadBalancer services do this. All MetalLB modes, and all cloud implementations, etc. It's built into the core k8s logic for services, no way to turn it off. Yes, it means the number of LBs is limited by the number of available NodePorts, by default 2767. Sorry, there's nothing I can do to improve this. If this is a problem for you, you should report a bug in upstream Kubernetes and explain why this breaks your use case. Hopefully that will encourage k8s devs to remove the requirement that LoadBalancer has a NodePort. |
@danderson thanks to explain that , i will try to report this in the upstream. thanks a lot . |
Is this a bug report or a feature request?:
bug
What happened:
when i install the metalb, and then specify the service type to LoadBalancer,
then it will give me a exteranl_ip correctly, and it works.
but I find that the service will automactilly allocated a nodePort, why this happened?
What you expected to happen:
nodePort should not be allocated and used.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
uname -a
): ubuntu16.04 standard 4.4 kernelThe text was updated successfully, but these errors were encountered: