Skip to content
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

Load Balancer on ingress goes to unused servers #174

Closed
jaumecornado opened this issue Mar 24, 2021 · 12 comments
Closed

Load Balancer on ingress goes to unused servers #174

jaumecornado opened this issue Mar 24, 2021 · 12 comments

Comments

@jaumecornado
Copy link

I have a 7 node kubernetes cluster with nginx-ingress.

Captura de Pantalla 2021-03-24 a les 11 39 41

If ingress is not deployed on all nodes; Load Balancer goes to mixed health. Can we go on green?

@blafasel42
Copy link

same here. IMHO LB should not get targets for nodes which are not workers...

@sergeyshevch
Copy link

Or as an alternative LB can remove the target if it is unhealthy for some period. So your target will be removed from LB

@Shadowghost
Copy link

You can manually exclude nodes from the LB until (if ever) this is automated: #182 (comment)

@RyanSquared
Copy link

Just ran into this issue where we have 25+ nodes in a cluster (breaking the Hetzner load balancer limit) and the Service was pointing to all nodes even though some nodes can't even run the LoadBalancer'd application. Would be very nice to dynamically update the LoadBalancer based on whether or not a node has a Pod that is running the LoadBalancer'd application.

@sergeyshevch
Copy link

@RyanSquared i guess you can exclude this node with annotations from previous comment

@RyanSquared
Copy link

@RyanSquared i guess you can exclude this node with annotations from previous comment

We have 23 nodes that we're considering "general purpose"/"untainted", and at some point I think we're gonna have to dedicate some nodes specifically for load balancer services and have every node labeled as excluded.

@Shadowghost
Copy link

Shadowghost commented Jul 9, 2021

This is how Kubernetes handles it right now.

Since Kubernetes 1.21 the ServiceNodeExclusion FeatureGate is enabled by default, so you should only need to add the correct annotation to your nodes if you're on Kubernetes 1.21+

@blafasel42
Copy link

can you give us a hint, which annotation exactly, @Shadowghost?

@Shadowghost
Copy link

The one I mentioned here: #182 (comment)
node.kubernetes.io/exclude-from-external-load-balancers: "true"

@blafasel42
Copy link

ah, so I annotate nodes. makes sense since controller nodes will be quite static. Thanks for the insight!

@LKaemmerling
Copy link
Member

I will close the issue here, as the Cloud Controller Manager is not in charge of "selecting" the nodes. @Shadowghost already posted the k8s solution to exclude the nodes: #182 (comment)

@LKaemmerling LKaemmerling pinned this issue Aug 25, 2021
@easystartup-io
Copy link

CCM has support for this annotation as mentioned here

"load-balancer.hetzner.cloud/node-selector"

https://pkg.go.dev/github.com/hetznercloud/hcloud-cloud-controller-manager/internal/annotation#Name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants