[root@kube-node1 ~]# cat /etc/haproxy/haproxy.cfg global log /dev/log local0 log /dev/log local1 notice chroot /var/lib/haproxy stats socket /var/run/haproxy-admin.sock mode 660 level admin stats timeout 30s user haproxy group haproxy daemon nbproc 1 defaults mode tcp log global timeout connect 5000 timeout client 10m timeout server 10m listen admin_stats bind 0.0.0.0:10080 mode http log 127.0.0.1 local0 err stats refresh 30s stats uri /status stats realm welcome login Haproxy stats auth admin:123456 stats hide-version stats admin if TRUE frontend tcp-in #前端服务tcp-in mode tcp bind 0.0.0.0:8443 #监听1884端口 log global default_backend kube-master backend kube-master bind 0.0.0.0:8443 mode tcp option tcplog balance source server 192.168.0.72 192.168.0.72:6443 check inter 2000 fall 2 rise 2 weight 1 server 192.168.0.73 192.168.0.73:6443 check inter 2000 fall 2 rise 2 weight 1 server 192.168.0.74 192.168.0.74:6443 check inter 2000 fall 2 rise 2 weight 1