hcloud-cloud-controller-manager icon indicating copy to clipboard operation
hcloud-cloud-controller-manager copied to clipboard

Load balancer with control plane nodes only?

Open tboerger opened this issue 2 years ago • 6 comments

I got a small cluster where control plane nodes also act as worker nodes, the load balancer gets created, but it doesn't have any target? Can somebody give me a hint how the load balancer takes the control plane nodes as a target?

tboerger avatar Apr 11 '22 15:04 tboerger

up

gris-gris avatar Apr 27 '22 19:04 gris-gris

For those who came here for a solution, just set this feature gate within your hcloud ccm deployment and it will work: --feature-gates=LegacyNodeRoleBehavior=false

tboerger avatar Jun 01 '22 14:06 tboerger

@tboerger This seems to have been removed in the latest CCM (probably due to the upgrade of inner Kube libs that removes that in 1.22), as I get this error now:

Error: invalid argument "LegacyNodeRoleBehavior=false" for "--feature-gates" flag: unrecognized feature gate: LegacyNodeRoleBehavior
Usage:
  cloud-controller-manager [flags]

What is the new way of achieving the above?

mysticaltech avatar Sep 19 '22 15:09 mysticaltech

I would propose re-opening this issue, as it no longer works and is causing an issue with our project https://github.com/kube-hetzner/terraform-hcloud-kube-hetzner/issues/311; any help in solving this would be appreciated!

CC. @LKaemmerling 🙏

mysticaltech avatar Sep 19 '22 16:09 mysticaltech

Great that I haven't updated yet

tboerger avatar Sep 19 '22 18:09 tboerger

@tboerger, I feel that the feature-gates page holds the key to getting this to work with the new CCM; especially interesting seem the ServiceNodeExclusion feature gate.

It says:

ServiceNodeExclusion: Enable the exclusion of nodes from load balancers created by a cloud provider. A node is eligible for exclusion if labelled with "node.kubernetes.io/exclude-from-external-load-balancers".

From the above, I would deduce that with the new setup, the "master" / "control-plane" label is not looked at by the CCM to deal with LBs if the ServiceNodeExclusion is set to true. It will only exclude nodes if they have the "exclude-from-external-load-balancers" label.

What do you think? Now probably a good idea to test. I will do it as soon as I have some time for this.

mysticaltech avatar Sep 22 '22 14:09 mysticaltech

@tboerger The fix is just to remove this feature gate thing, it's just no longer needed all together! Updating to the latest CCM will just abide by the control-plane label by default, if you remove it on the control-plane nodes, those will show up as targets in LBs.

ksnip_20221007-161202

This can be closed for good!

mysticaltech avatar Oct 07 '22 14:10 mysticaltech