Skip to main content

A controller to auto configure k8s load balancer on premise

Project description

# What’s that thing?

lb-controller is kubernetes operator that can handle dynamic reconfiguration of an external load balancer, e.g haproxy, it aims to allow the use of the LoadBalancer service type with on premise clusters.

This operator is not deployed in the K8s cluster but on the load balancers and is a subscriber of the cluster events to know when it has to wake up and do its thing.

We thought of 3 scenarios while building this app :

  • HAProxy + keepalived

  • Envoy + keepalived

  • keepalived only

The advantage of this implementation compared to [MetalLB](https://metallb.universe.tf/) is that you gain the ability to completely master the LB configuration, for example ipv6 to ipv4 or specific SSL configurations.

# How should I integrate lb-controller

  • Install haproxy and keepalived

  • pip install lb-controller

  • add the configurations in /etc/lb-controller/

  • Define a dedicated service account to consume only the appropriate resources from the cluster API server

  • set this identity in the /root/.kube/config file on the HAProxy hosts.

You can find an ansible role at this adress … as an example.

# Metrics

This app exposes two metrics in the openmetrics format to be scrape by prometheus for example: - number of valid loadbalancers - number of invalid loadbalancers

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lb_controller-0.0.3.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distributions

lb_controller-0.0.3-py3-none-any.whl (7.4 kB view hashes)

Uploaded Python 3

lb_controller-0.0.3-py2-none-any.whl (9.0 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page