I’m trying to dynamically add subdomain routing entries to my loadbalancer as containers and services are created.
visiting vpn.example.com should connect me to vpn container port 80
visting vpc.example.com should connect me to vpc container port 8081
The static label syntax looks like:
What I’m trying to do should be solved by https://github.com/rancher/rancher/issues/2288
But for now it looks like I’m going to have to create an agent that will update my load balancer dynamically as services are created.
To that effect, I’m trying to figure out how to create an Advanced Load Balancing link (L7 type) using the API.
From what i’ve figured out so far, I need to create a loadBalancerServiceLink type object and post it to the http://localhost:5000/v1/loadbalancerservices/1s2/?action=setservicelinks endpoint, however I’m not really sure of the structure of a loadBalancerServiceLink object.
What is the structure for serviceId and ports? or am I completely down the rabbit hole and missing some other obvious API endpoint?