官网推荐架构:
- Rancher 的 DNS 应该被解析到四层负载均衡器上。
- 负载均衡器应该把 TCP/80 端口和 TCP/443 端口的流量转发到集群中全部的 3 个节点上。
- Ingress Controller 将把 HTTP 重定向到 HTTPS,在 TCP/443 端口使用 SSL/TLS。
- Ingress Controller 把流量转发到 Rancher Server 的 pod 的 80 端口。
在Kubernetes集群中安装Rancher,并使用四层负载均衡,SSL终止在Ingress Controller中
服务器信息:
服务器 | 公网地址 | rancher私网地址 | 用途及角色 | 服务器配置 |
nginx | 192.168.198.130 | 反向代理及负载均衡 | 1c 2g | |
rancher1 | 192.168.198.150 | 10.10.10.150 | controlplane, worker, etcd | 2c 4g |
rancher2 | 192.168.198.151 | 10.10.10.151 | controlplane, worker, etcd | 2c 4g |
rancher3 | 192.168.198.152 | 10.10.10.152 | controlplane, worker, etcd | 2c 4g |