haproxy as loadbalancer for kube-apiserver haproxy as loadbalancer for kube-apiserver kubernetes kubernetes

haproxy as loadbalancer for kube-apiserver


I had the same issue as you. I assume the watch requires some sort of state on the api server side.The solution is to change the configuration so all the requests from a client go to the same server using balance source. I assume you only have multiple api servers so kubernetes is highly available (instead of load balancing).

frontend http_front_8080  bind *:8080  stats uri /haproxy?stats  default_backend http_back_8080backend http_back_8080  balance source  server m01 192.168.33.21:8080 check  server m02 192.168.33.22:8080 check  server m03 192.168.33.23:8080 check