-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Kubernetes multi-backend service loadbalancer #1343
Kubernetes multi-backend service loadbalancer #1343
Conversation
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
First, let me say thanks for participating. Community contribution is what makes this project fly. That said, this is essentially unreviewable. It is far too large with far too much scope. GitHub can't even load many of the commits because they are too big. Specifically, the very first commit - I was hoping it would be a design doc explaining what this is about, what problems it is solving, what other projects it obsoletes, etc. It may well be that I am just overwhelmed at the idea of 63 commits and 1300+ files, but I can't even start to think about this. Can you please ease us into it? Where's the problem statement and design discussion? Can you squash commits like "Updating README" into commits where they are relevant, or at least lump them together? A smaller number of fully-formed commits is better than a large number of fragments, but a single mega-PR is no good either. Maybe put godeps changes into wholly distinct commits, so we can avoid GitHub's UI for it. Sorry to criticize superficially - I just don't know how to even start thinking about this one :) |
Hi Tim, Thank you for your feedback. This is my first PR to kubernetes project. I understand where you are coming from. I will squash some of the commits, separate out the vendors file into a different PR and construct a design doc about this project. |
You don't need to split to different PRs, just different commits in this PR On Mon, Jul 11, 2016 at 10:27 AM, Steve Leon [email protected]
|
…nd Makefiles - Adding vendor files - Adding support for building container and linux target from non-Linux systems by leveraging docker - Added makefile for loadbalancer/ingress-loadbalancer - Added Dockerfile - Added gitignore to loadbalancer subprojects
Hi Tim, Thanks, |
Tim, how do I add @abithap to this PR so that googlebot accepts the CLA? |
Only a human can work out the case in question and even then only when they decide to either click or not click the big green merge button. If/when Tim does review he'll deal with it. Nothing you can do about the CLA bot here. |
@thockin Do you think this PR is in a better state where it could be reviewed? Thanks |
… backends This controller is designed to easily integrate and create different load balancing backends. From software, hardware to cloud loadbalancers. For software loadbalancer, keepalived is used to manage VIPs so that software loadbalancers can bind to them. The software loadbalancers run in nodes with keepalived. They communicate with the loadbalancer controller via configmaps. - Added backend for provisioning Openstack Lbaas - Nginxs added as loadbalancer-daemon backend - Added a keepalived controller to manage VIPs for nginx backend - Updated Dockerfile to include keepalived and its dependency packages - Added example files - Added README
- Create a daemon configmap that will be consumed by the loadbalancer-daemons to configure software loadbalancers - Refactor the controller and moved logics to the backend controller implementation - Make software loadbalancer (loadbalancer-daemon) the default backend - Updated README file to include daemon backend for software loadbalancer - Updated example files
- This implements a VIP controller which assign VIP from a pool to a service. - The VIP is used by loadbalancer-daemon to provide keepalived and nginx the IP for binding the service - Add bind-ip to the user's configmap -- This is use to let the user know what the bind IP is -- Updated examples to show bind-ip or vip in user configmap
- Added go routines to monitor the nginx and keepalived process. - If either of them is killed, the main process will exit with no zero error code - Kubernetes will then spawn a new loadbalancer controller process
- Create pool, members, monitor and virtual server for every kube server - Added example for f5 controller - Rename ingress-loadbalancer to kube-loadbalancer - Update readme to include F5 backend
- Lbaas resources will not be deleted if the states of the kube nodes, services or configmap config are teh same
- If an error occurs during a loadbalancer creating, the error message and status will be added to the user's configmap - Add authentication error logging for f5
- Make virtual router ID for keepalived configurable - Added lock when updating configmap to prevent race conditions - Made keepalived options to be configurable
@thockin @eparis: I would really like to get some tractions on this PR. I have updated the first comment to provide more information about this project. Please let me know if there is anything else that is unclear. I have also organized the commits so that they are grouped together. Last, travis is happy with this. My last commit took care of lint and boilerplate header issues. Please let me know if there is anything else i could do to make it easier for you to review. |
cc @bprashanth |
Since /contrib is going away (#762), I am closing this PR. This project will live in https://github.com/hpcloud/kubernetes-service-loadbalancer until it can be part of kubernetes-incubator. |
mark |
This addresses issue #1506
High Available Multi-Backend Load balancer
The project implements a load balancer controller that will provide a high available and load balancing access to HTTP and TCP kubernetes applications. It will support different type of loadbalancer backends ranging from software LB such as nginx, to hardward LB such as F5 and cloud LB like Openstack LBaaS.
To create a loadbalancer, users will just have to create a configmap and provide two inputs:
A configmap targeted to the loadbalancer controller would look like:
Once the configmap is created, a new backend is create and configured to loadbalance the provided service.
Our goal is to have this controller listen to ingress events, rather than config map for generating config rules. Currently, this controller watches for configmap resources to create and configure backend. Eventually, this will be changed to watch for ingress resource instead. This feature is still being planned in kubernetes since the current version of ingress does not support layer 4 routing.
This controller is designed to easily integrate and create different load balancing backends. From software, hardware to cloud loadbalancer. Our initial featured backends are software loadbalacing (with keepalived and nginx), hardware loadbalancing with F5 and cloud loadbalancing with Openstack LBaaS v2 (Octavia).
Software Loadbalancer via Daemon and VIPs
In the case of software loadbalancer, this controller works with loadbalancer-controller daemons which are deployed across nodes and will server as high available loadbalancers. The loadbalancer controller will communicate with the daemons via a configmap resource.
These daemon controllers use keepalived and nginx to provide the high availability loadbalancing via the use of VIPs. VIPS are allocated to every service that's being loadbalanced. This will allow multiple services that bind to the same ports to work.
For F5 and Openstack LBaaS, the loadbalancer controllers talk to the appropriate servers via their APIs. So loadbalancer-controller daemons are not needed.
Difference between this and service-loadbalancer or nginx.
Service-loadbalancer is a great option but it is only tailored for software loadbalancer using HAProxy and it is not designed in a way that it can be easily decoupled.
The nginx ingress controller is only for nginx and only works for layer 7 applications. This project is intended to provide support for many different backends and work with all kubernetes applications (layer 7 and layer4).
Service-loadbalancer support for L4 is very limited. The binding-port needs to be open and specified as a hostPort during the controller creation. This forces the users to specify and open the ports at the beginning. This will also prevent two different services to loadbalance on the same port (ie running two mysql services). This projects uses VIPs to resolve this limitation.
Examples:
Software Loadbalancer using keepalived and nginx
This change is