hetznercloud / hcloud-cloud-controller-manager

Kubernetes cloud-controller-manager for Hetzner Cloud
Apache License 2.0
736 stars 118 forks source link

Document the lifecycle of LB #104

Closed StarpTech closed 4 years ago

StarpTech commented 4 years ago

Hello, I'm looking for a solution to preserve a load balancer IP. Currently, when I remove the LoadBalancer service the LB is removed. Other providers like Linode provide annotations preserve, nodebalancer-id to control that.

StarpTech commented 4 years ago

I observed the behavior that specifying load-balancer.hetzner.cloud/name: "traefik" will preserve the IP even when the LB was removed. Is that intentional?

LKaemmerling commented 4 years ago

You can reuse a Load Balancer by using load-balancer.hetzner.cloud/name or load-balancer.hetzner.cloud/id annotation (https://pkg.go.dev/github.com/hetznercloud/hcloud-cloud-controller-manager/internal/annotation#Name).

You should also activate the deletion protection within the Hetzner Cloud UI otherwise, the Loadbalancer would be deleted when you delete the service.

Please also keep in mind that the Cloud Controller always overwrites all changes on the Load Balancer (deletion protection is excluded, as this is not controllable via the Cloud Controller Manager), so when you add a Load Balancer service manually through the cloud console, the Cloud Controller Manager will delete this service.

StarpTech commented 4 years ago

Thanks for the info.

StarpTech commented 4 years ago

I think it might help others to document this.