现在报 port 6443 is in use. 我的haproxy是这么配置的:
lobal
log /dev/log local0 warning
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
stats socket /var/lib/haproxy/stats
defaults
log global
option httplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
frontend kube-apiserver
bind *:6443
mode tcp
option tcplog
default_backend kube-apiserver
backend kube-apiserver
mode tcp
option tcplog
option tcp-check
balance roundrobin
default-server inter 10s downinter 5s rise 2 fall 2 slowstart 60s maxconn 250 maxqueue 256 weight 100
server kube-apiserver-1 192.168.3.101:6443 check # Replace the IP address with your own.
server kube-apiserver-2 192.168.3.102:6443 check # Replace the IP address with your own.
server kube-apiserver-3 192.168.3.103:6443 check # Replace the IP address with your own.