Skip to content

AtarisMio/k3s-haproxy-lb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k3s-haproxy-lb

  • maintained by

Ataris Mio

Why use haproxy

k3s's klipper-lb(servicelb) cannot pass clientip to pods, traefik support proxy protocol, so I custom klipper-lb image using haproxy for tcp traffic.

Usage

You can already modify this as part of custom cloud provider config. Start K3s with --kube-cloud-controller-manager-arg=cloud-config=/etc/rancher/k3s/cloud-config.json, and place the following in /etc/rancher/k3s/cloud-config.json

{
  "lbEnabled": true,
  "lbImage": "docker.io/ataris/klipper-haproxy-lb:2.9.7-alpine",
  "lbNamespace": "kube-system",
  "nodeEnabled": true,
  "rootless": false
}

Reference