通过浮动 IP 路由流量

通过浮动 IP 路由流量

我有一个 (kubernetes) 集群(3 台服务器,ips 172.20.10.[10,11,12]),它们之间有 1 个浮动 ip(172.20.10.20)。我的提供商有一个 1:1 NAT,用于将专用公共 ip 转换为浮动 ip。所有浮动 ip 都运行正常(当具有 ip 的 ip 发生故障时,其他 ip 之一会接管该 ip),这样任何时候只有一个 ip 拥有该 ip。所有传入流量也都正常运行,但让我们来看看这个问题。

所有传出流量都来自单个 IP 172.20.10.[10,11,12],因此提供商将其 NAT 到通用公共 IP。但我希望流量来自浮动 IP(来自所有 3 个主机)。搜索后我发现 NAT 可能是一个解决方案,但我不知道它是否可行,都在同一网络上。

All 3 hosts having the floating ip as gateway, and on all 3 have the iptables rules
to nat the traffic from them to the real gateway masking to the floating ip, would this work?

还有其他人吗?

相关内容