EasyHAProxy Ingress Controller

EasyHAProxy is an Ingress and Auto Discover service based on HAProxy.

HAProxy is an open-source, high-performance load balancer and reverse proxy designed for TCP and HTTP-based applications. Renowned for its stability, reliability, and performance, it is widely adopted in production environments.

EasyHAProxy combines HAProxy’s robustness with seamless service discovery and exposure within Kubernetes clusters. It offers a straightforward method to configure Ingress rules for services.

Key Features

  • Handles and routes HTTP, HTTPS, and TCP traffic (e.g., MySQL server).
  • Supports custom error messages.
  • Integrates Let’s Encrypt SSL certificate functionality.
  • Automatically discovers services within the Kubernetes cluster.
  • Facilitates the configuration of Ingress rules for services.
  • Provides load balancing capabilities.

Software Included

Package Version License
haproxy 2.6.15 GPL2

Creating an App using the Control Panel

Click the Deploy to DigitalOcean button to install a Kubernetes 1-Click Application. If you aren’t logged in, this link will prompt you to log in with your DigitalOcean account.

Deploy to DO

Creating an App using the API

In addition to creating EasyHAProxy Ingress Controller using the control panel, you can also use the DigitalOcean API. As an example, to create a 3 node DigitalOcean Kubernetes cluster made up of Basic Droplets in the SFO2 region, you can use the following doctl command. You need to authenticate with doctl with your API access token) and replace the $CLUSTER_NAME variable with the chosen name for your cluster in the command below.

doctl kubernetes clusters create --size s-4vcpu-8gb $CLUSTER_NAME --1-clicks easyhaproxy

Getting Started After Deploying EasyHAProxy Ingress Controller

After enabling EasyHAProxy you need to MANUALLY create a load balancing pointing to your Kubernetes Cluster. EasyHAProxy doesn’t create it manually. Here are the instructions.

How to set up your application for EasyHAProxy

You need to add to your application ingress annotations to expose your service to the EasyHaProxy service.

kind: Ingress
    kubernetes.io/ingress.class: easyhaproxy-ingress


Check if the EasyHAProxy is running properly

You can install the “Static Http Server” and define the domain you want to validate as the example below:

helm repo add byjg https://opensource.byjg.com/helm
helm repo update
helm upgrade --install mysite byjg/static-httpserver \
    --namespace default \
    --set "ingress.hosts={www.example.org,example.org}" \
    --set parameters.title=Welcome

EasyHAProxy Container not Starting

Due to limitations in the HAProxy community edition, EasyHAProxy functions solely as a standalone service, regardless of the number of nodes present.

If the node hosting EasyHAProxy experiences downtime, the service will remain unavailable until the node is operational again.

To restore connectivity, you have the option to deploy or upgrade the EasyHAProxy service.