mxschmitt / ui-driver-hetzner

Rancher UI driver for the Hetzner Cloud docker driver.
https://mxschmitt.github.io/ui-driver-hetzner
Apache License 2.0
255 stars 50 forks source link

Support Hetzner Cloud Load Balancers #93

Open ceelian opened 4 years ago

ceelian commented 4 years ago

Just saw that Hetzner has now Cloud Load Balancers (beta). Would be a nice addition for the rancher driver as well at some point.

Info: https://www.hetzner.com/news/07-2020-load-balancer/

Product Page: https://www.hetzner.com/cloud/load-balancer

Cloud Controller: https://github.com/hetznercloud/hcloud-cloud-controller-manager

eramahatra commented 4 years ago

use case : when a server is deleted, it's detached from the LB Once created again with rancher, it should be automatically assigned to a given LB. Note : LB should be assigned on the Worker nodes and not the Master nodes

ceelian commented 4 years ago

@eramahatra personally I would suggest it even more simple. A LB is created when a new cluster is created, Loadbalancer is infront of all nodes because you could have mixtures of worker/master nodes or even change that after creation. When Cluster is deleted, LB is deleted as well.

anebi commented 4 years ago

I don't think that autocreation of LB should be done, because this is a paid service and someone would like to use built in nginx instead of LB or to use cheaper frontend servers with haproxy or nginx instead of LB. Using Hetzner LB must be optional.

Other than that, I agree that if LB usage is requested then nodes assignment/removal must be automated. Also it would be great if there is a way to disable LB in edit cluster option and go back to simple rancher nginx usage if user wants to get rid of LB.

Another thing that should be checked and considered is CloudFlare and another DNS features that Rancher has. When LB is used, then the DNS records that are created on DNS providers must use the LB IP address/domain name instead of worker nodes ip addresses.

haswalt commented 4 years ago

We've created a small pod that runs as a daemonset on all nodes. It simply adds nodes to the LB when they start and removes them when stopped.

If there's any interest in this as a solution I'll publish it on GitHub.

spatialy commented 3 years ago

We've created a small pod that runs as a daemonset on all nodes. It simply adds nodes to the LB when they start and removes them when stopped.

If there's any interest in this as a solution I'll publish it on GitHub.

Hi @haswalt can you publish your solution? We are using MetalLB but think for some uses cases this is over-complex.

Best

haswalt commented 3 years ago

@spatialy yes i'll prepare something for early next week.

haswalt commented 3 years ago

@spatialy actually did it already: https://github.com/BlueBambooStudios/hcloud-connect