-
Notifications
You must be signed in to change notification settings - Fork 2.4k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Ingress is going on all the nodes #10434
Comments
The ingress is exposed via a loadbalancer. the default loadbalancer for k3s is servicelb, which is documented here: https://docs.k3s.io/networking/networking-services#service-load-balancer The docs cover limiting which nodes the loadbalancer uses. |
yes that is the documentation I said I was following. I tried putting the labels everywhere without success (as I explained) I have no clue what is missing right now. So, there is one problem:
Could you give me some pointers if that is just a documentation issue? thanks |
I downloaded K3S's code and it looks like the problem is that the k3s code is only selecting nodes for LoadBalancer So, in other words, that cannot work. It seems I would need to:
You might consider automatically doing that. For instance, when |
It is easy enough to do that for yourself, if that's something you want. Most people don't. If you just wanted the ingress to only use a single node, you could just only label that node with If you want more fine grained control, you could:
If you want to be able to use different ingress classes for different nodes then yes, that will take much more customization and likely multiple installations of the traefik ingress controller, each bound to its own service and lbpool. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Environmental Info:
K3s Version:
Node(s) CPU architecture, OS, and Version:
Cluster Configuration:
In 2 different datacenters.
Describe the bug:
I am setting up k3s on 2 nodes (just for testing. Will add more later). I could deploy a test website on a specific node (using labels), but then, when creating an
Ingress
, it is installing it on all the nodes (the ingress has all the external addresses instead of only the one I want).Steps To Reproduce:
Common variables:
My K3S server config:
My K3S agent config:
I tried this https://docs.k3s.io/networking/networking-services#controlling-servicelb-node-selection .
My nodes have different labels:
Then, I wasn't sure which label and on which Kind of resource to place it, so I applied both labels:
on resources:
Expected behavior:
That checking the ingresses would show only 1 address service it like:
Actual behavior:
Checking the ingresses, the 2 nodes are still serving it:
Additional context / logs:
Here is my full test resources:
The text was updated successfully, but these errors were encountered: