参考资料
- 假设已经参考其他文章搭建了 haproxy+keepalived 的负载均衡
haproxy 使用 sni 区分需要发送的后端
- 假设 nginx 后端的 tls subject 域名为 example.internal, k3s 则为默认的 cluster.local
测试 haproxy 能否正确分流
添加 keepalived vip 到 DNS 记录
- 假设 nginx 部署了
www.example.internal页面, k3s 为 traefik 开启了面板并配置 host 为traefik-dboard.traefik.cluster.local - k3s 开启内置 traefik 面板查看其他文章
- openssl 测试
openssl s_client -connect <keepalived_vip>:443 -servername traefik-dboard.traefik.cluster.local | grep "subject="openssl s_client -connect <keepalived_vip>:443 -servername www.example.internal | grep "subject="
- Author:白鸟3
- URL:https://blog.kun2peng.top/internet/k8s_traefik_haproxy
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!
