Name: lb-controller
Owner: Rancher
Description: Load Balancer for Rancher services via ingress controllers backed up by a Load Balancer provider of choice
Created: 2016-05-03 16:35:25.0
Updated: 2018-05-16 14:55:48.0
Pushed: 2018-05-11 17:28:36.0
Homepage: null
Size: 5063
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
L7 Load Balancer service managing load balancer provider configured via load balancer controller. Pluggable model allows different controller and provider implementation. v0.1.0 has support for Kubernetes ingress as a controller, and Rancher Load Balancer as a provider. Rancher provider is a default one, although you can develop and deploy your own implementation (nginx, traefic, etc).
When Kubernetes is passed as an LB controller argument, the app would be deployed to work as a Kubernetes Ingress controller. The controller listens to Kubernetes server events like:
and generates LB config based on the Kubernetes ingress info. After config is generated, it gets passed to LB provider - Rancher provider in our case. The provider will create Rancher Load Balancer service for every Kubernetes ingress, and propagate Load Balancer public endpoint(s) back to the Controller. The controller in turn would update Kubernetes ingress with the Address = Rancher Load Balancer public endpoint (ip address of the host where Rancher Load Balancer is deployed):
bectl get ingress
RULE BACKEND ADDRESS
- 104.154.107.202 // host ip address where Rancher LB is deployed
foo.bar.com
/foo nginx-service:80
Rancher Load Balancer provider:
Refer to kubernetes-ingress and kubernetes ingress-controller for more info on Kubernetes ingress and ingress controller implementation solutions.
You can build LB controller using Rancher dapper tool. Just install Dapper, and run the command below from lb-controller directory:
er
it would build the binaries and create an lb-controller image.
LB controller with Kubernetes/Rancher support can be deployed as:
ersion: extensions/v1beta1
: Ingress
data:
me: scaledlb
notations:
scale: "2"
http.port: "99"
:
ckend:
serviceName: nginx-service
servicePort: 90
as a result ingress gets updated with multiple public addresses end points:
bectl get ingress
RULE BACKEND ADDRESS
- 104.154.107.202, 104.154.107.203 // hosts ip addresses where Rancher LB instances are deployed
foo.bar.com
/foo nginx-service:80
ersion: extensions/v1beta1
: Ingress
data:
me: scaledlb
notations:
http.port: "99"
https.port: "444"
:
ckend:
serviceName: nginx-service
servicePort: 90
More info on the above can be found here