hcloud-cloud-controller-manager
hcloud-cloud-controller-manager copied to clipboard
Load balancer with control plane nodes only?
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?
up
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 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?
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 🙏
Great that I haven't updated yet
@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.
@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.
This can be closed for good!