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.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

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:


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.