Skip to content

aledbf/kuproxy

 
 

Repository files navigation

kuproxy

Proof of concept for a Kubernetes aware external load balancer. Uses HAproxy under the hood for the actual load balancing.

The idea is to have an haproxy that self configures when a Kubernetes pod goes online/offline.

For now it just prints a bunch of debug info when a Kubernetes pod goes online/offline.

Pre-requisites

  • gb build tool

Build

Run make to install dependencies and build the project.

make

Run

kuproxy depends on a Kubernetes cluster.

For now you can use this Kubernetes example cluster.

Find out where the Kubernetes master is running.

vagrant ssh master
kubectl cluster-info

Then start the load balancer with.

kuproxy --master="http://<kubernetes.master.ip>:2379"

Check everything is running by launching a Kubernetes pod. For example:

vagrant ssh master
kubectl run-container nginx --image=nginx --replicas=2 --port=80

Stop the pod with.

vagrant ssh master
kubectl stop rc nginx

About

Kubernetes aware HAproxy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 96.9%
  • Makefile 3.1%