By jasonleach
Hi,
When adding a Loadbalancer to a Kubernets cluster does it need to be added from a YAML file or can it be added from the Web UI? Any advantage to either way?
I notice that when I add it via YAML my droplets health checks don’t work and doing kubectl -n Kube-system describe my-load-balancer shows different ports (that cannot be changed) than the Web UI.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
For the Load Balancer to be used within the Cluster, it must be created through Kubernetes as an object. You can see examples for this here:
https://www.digitalocean.com/docs/kubernetes/how-to/add-load-balancers/ https://www.digitalocean.com/docs/kubernetes/how-to/configure-load-balancers/
The DigitalOcean CCM ( https://github.com/digitalocean/digitalocean-cloud-controller-manager/tree/master/docs/controllers/services/examples ) handles the creation of the object within the cluster and the provisioning of the Load Balancer on your account.
The health checks are based on the pods identified under the selector spec of the service, so you will need to ensure that your service has endpoints to working pods that are placed on the different nodes in your cluster so the health checks can succeed and the load balancer will properly route requests to those services.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.