oci-cloud-controller-manager icon indicating copy to clipboard operation
oci-cloud-controller-manager copied to clipboard

Associate service with existing Load Balancer OCID

Open owainlewis opened this issue 7 years ago • 3 comments

An internal request was raised for the ability to associate a service with an existing OCI Load Balancer OCID. This ticket is to track discussion on the feature.

owainlewis avatar Jul 17 '18 08:07 owainlewis

I think this makes sense for a micro services style api service, it would get quite expensive to have an LB for every micro service, although really users probably would want path based LB routing which i don't think we have yet? So they'd have to do it on port - not as common but i have seen it. Obviously by re-using an LB you're putting more eggs in your basket...

simonlord avatar Jul 17 '18 09:07 simonlord

To support path based routing we'd need to use an ingress controller. This change would be to allow a user to use an existing load balancer with a service object.

owainlewis avatar Jul 17 '18 11:07 owainlewis

This is actually possible now with a little hackery if you're willing to change the display name of your load balancer I believe:

  1. Create a Service type=NodePort
  2. Record its .metadata.UID
  3. Update the display name of the load balancer to match the UID (plus any prefix)
  4. Change the Service to be Service type=LoadBalancer
  5. It should then use your existing load balancer.

There is work going on upstream (see: https://github.com/kubernetes/kubernetes/pull/66589) around load balancer naming which might affect this discussion.

prydie avatar Aug 08 '18 12:08 prydie