Skip to content
This repository was archived by the owner on Mar 25, 2024. It is now read-only.

Commit f092d55

Browse files
author
Alena Prokharchyk
committed
Doc update
1 parent 4aff6d1 commit f092d55

1 file changed

Lines changed: 83 additions & 1 deletion

File tree

README.md

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,83 @@
1-
# Work in progress ingress-controller project
1+
# Ingress controller
2+
3+
L7 Load Balancer service managing external load balancer provider configured via load balancer controller.
4+
Pluggable model allows different controller and provider implementation. v0.1.0 has support for Kubernetes ingress as an LB controller, and Rancher Load Balancer as a provider.
5+
Rancher LB provider is a default one, although you can develop and deploy your own implementation (nginx, ELB, F5, etc).
6+
7+
# Design
8+
9+
* ingress-controller gets deployed as a containerized app with controller and provider names passed as an argument
10+
* LB controller listens to the corresponding server events, generate load balancer config and pass it to the provider to apply.
11+
* LB provider configures external load balancer, and pass LB public end point to the lb controller.
12+
* LB controller propagates LB public end point back to the server.
13+
* LB controller doesn't carry any provider implementation details; it communicates with the provider via generic provider interface using generic LB config.
14+
15+
# Kubernetes as an LB controller and Rancher as an LB provider
16+
17+
When Kubernetes is passed as an LB controller argument, the app would be deployed to work as a Kubernetes Ingress controller.
18+
The controller listens to Kubernetes server events like:
19+
20+
* Ingress create/update/remove
21+
* Backend services create/remove
22+
* Backend services' endpoint changes
23+
24+
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.
25+
The provider will create Rancher Load Balancer service for every Kubernetes ingress, and propagate Load Balancer public endpoint(s) back to the Controller.
26+
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):
27+
28+
```
29+
> kubectl get ingress
30+
NAME RULE BACKEND ADDRESS
31+
test - 104.154.107.202 // host ip address where Rancher LB is deployed
32+
foo.bar.com
33+
/foo nginx-service:80
34+
35+
```
36+
37+
38+
Rancher Load Balancer provider:
39+
40+
* Configures Rancher LB with hostname routing rules and backend services defined in Kubernetes ingress.
41+
* Monitors Rancher LB public endpoint changes(LB instance gets redeployed on another host) and report them back to controller, so Kubernetes ingress will be updated accordingly.
42+
* Manages Rancher LB lifecycle - destroy LB when ingress is removed, create LB once new ingress is added, update LB config when ingress is updated
43+
44+
Refer to [kubernetes-ingress](//kubernetes.io/docs/user-guide/ingress/) and [kubernetes ingress-controller](//github.com/kubernetes/contrib/blob/master/ingress/controllers/README.md) for more info on Kubernetes ingress and ingress controller implementation solutions.
45+
46+
# Build ingress controller
47+
48+
You can build ingress controller using [Rancher dapper tool](//github.com/rancher/dapper). Just install Dapper, and run the command below from ingress-controller directory:
49+
50+
```
51+
dapper
52+
```
53+
54+
it would build the binaries and create an ingress-controller image.
55+
56+
57+
# Deploy ingress controller
58+
59+
Ingress controller with Kubernetes/Rancher support can be deployed as:
60+
61+
* part of Rancher system Kubernetes stack (recommended and officially supported way)
62+
* as a pod container in Kubernetes deployed through Rancher with ability to access Rancher server API.
63+
64+
65+
# To fix in the future release
66+
67+
* Horizontal scaling for Rancher LB service. Today it gets deployed with scale=1 (which is equal to 1 public endnpoint). We want to make scale manageable as kubernetes ingress allows multiple IPs in the ingress Address:
68+
69+
```
70+
> kubectl get ingress
71+
NAME RULE BACKEND ADDRESS
72+
test - 104.154.107.202, 104.154.107.203 // hosts ip addresses where Rancher LB instances are deployed
73+
foo.bar.com
74+
/foo nginx-service:80
75+
76+
```
77+
78+
* Integration with Route53 provider. LB service FQDN populated by Rancher Route53 service, will be propagated as an entry point for the ingress.
79+
* Add TLS support
80+
* Support for TCP Load balancer
81+
* Support for custom public port. Today only standard http port 80 is supported as a public port, and we want to make it configurable.
82+
83+

0 commit comments

Comments
 (0)