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
servicelb isn't using all nodes #8809
Comments
Okay, one new datapoint. It appears that servicelb, as configured in k3s, doesn't actually have dual stack support. Check this out:
As configured in k3s, the The |
Two nodes have replicas of nginx. You set the externalTrafficPolicy to local, so serviceLB only advertises the two nodes that have replicas. The 3rd node doesn't have a replica, and the external traffic policy would dictate that traffic to it be dropped - so we don't advertise its address. If you want to allow sending traffic to, and advertise the address of, nodes without replicas, change the external traffic policy.
That is not correct. The behavior depends on the external traffic policy, and how Kubernetes sets tl;dr it sounds like you don't want to use |
There is a FeatureGate that is alpha in 1.28 that will improve dual-stack support for https://kubernetes.io/docs/concepts/workloads/pods/downward-api/
Once that feature-gate goes beta and is on by default, we can evaluate how to best make use of it in servicelb. |
Confirmed, thank you @brandond. Switching to Cluster made this all work as expected. |
Environmental Info:
K3s Version:
$ k3s -v
k3s version v1.27.7+k3s2 (575bce7)
go version go1.20.10
Node(s) CPU architecture, OS, and Version:
Debian 12 (Bookworm)
Linux s1 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) x86_64 GNU/Linux
Cluster Configuration:
Describe the bug:
I have three servers:
I disabled traefik and replaced it with the nginx ingress controller (from nginx, not the kubernetes community). None of these nodes are labeled in any special way: servicelb should be happy using all of them. And indeed, you can see the three servicelb pods running properly here:
You can see that I have nginx configured to have two replicas:
Interestingly, its service only has two nodes in
status.loadBalancer.ingress
(four addresses, but remember this is dual stack).Indeed, if I curl port 80 of the external IPs of s2 or s3, I hit my ingress. But not s1. Shouldn't I be able to hit s1 as well, and have servicelb forward that traffic to either s2 or s3? What am I missing, here?
The text was updated successfully, but these errors were encountered: