HAProxy

2019/12/12 posted in  Linux

 验证配置文件

    haproxy -c -f /etc/haproxy/haproxy.cfg

负载均衡配置

frontend k8s-api

  bind 0.0.0.0:6443

  log global

  mode tcp

  default_backend k8s-api-server

backend k8s-api-server

  mode tcp

  log global

  balance roundrobin

  server ucloud-bj-k8s-master-01 10.9.142.180:6443 weight 1 maxconn 1000 check inter 2000 rise 2 fall 3

  server ucloud-bj-k8s-master-02 10.9.175.27:6443 weight 1 maxconn 1000 check inter 2000 rise 2 fall 3

  server ucloud-bj-k8s-master-03 10.9.91.143:6443 weight 1 maxconn 1000 check inter 2000 rise 2 fall 3