Associate service with existing Load Balancer OCID
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.
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...
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.
This is actually possible now with a little hackery if you're willing to change the display name of your load balancer I believe:
- Create a
Service type=NodePort - Record its
.metadata.UID - Update the display name of the load balancer to match the UID (plus any prefix)
- Change the Service to be Service type=LoadBalancer
- 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.