# 01-08 OpenWrt HAProxy 负载均衡 - 基础配置 # 文档:docs/01-08-openwrt-haproxy.md # 将 192.168.2.61~64 按实际 K3s 节点 IP 修改 global log /dev/log local0 maxconn 4096 # 部分 OpenWrt 需 daemon / pidfile,按发行版调整;若无 /dev/log 可改 log 127.0.0.1 local0 defaults mode http option httplog timeout connect 5s timeout client 30s timeout server 30s frontend http_in bind *:80 default_backend k3s_http frontend https_in bind *:443 mode tcp default_backend k3s_https backend k3s_http balance roundrobin server ylc61 192.168.2.61:80 check server ylc62 192.168.2.62:80 check server ylc63 192.168.2.63:80 check server ylc64 192.168.2.64:80 check backend k3s_https mode tcp balance roundrobin server ylc61 192.168.2.61:443 check server ylc62 192.168.2.62:443 check server ylc63 192.168.2.63:443 check server ylc64 192.168.2.64:443 check