global log127.0.0.1local2 chroot/var/lib/haproxy pidfile/var/run/haproxy.pid maxconn4000 userhaproxy grouphaproxy daemon # turn on stats unix socket statssocket/var/lib/haproxy/stats #--------------------------------------------------------------------- # common defaults that all the 'listen' and 'backend' sections will # use if not designated in their block #--------------------------------------------------------------------- defaults logglobal optionhttplog optiondontlognull timeoutconnect5000 timeoutclient5000 timeoutserver5000 #--------------------------------------------------------------------- # main frontend which proxys to the backends #--------------------------------------------------------------------- frontendkube-apiserver bind*:6443 modetcp optiontcplog default_backendkube-apiserver #--------------------------------------------------------------------- # round robin balancing between the various backends #--------------------------------------------------------------------- backendkube-apiserver modetcp optiontcplog balanceroundrobin default-serverinter10sdowninter5srise2fall2slowstart60smaxconn250maxqueue256weight100 serverkube-apiserver-1192.168.48.125:6443check