1
High availability / Virtual IP for Kubernetes Failover
« on: October 16, 2024, 08:52:01 pm »
Hopefully, this is the correct place for this topic as it involves HA, but not for HA instances of OPNsense. I'm trying to make a VIP in OPNsense for routing to my Kubernetes control planes, but I'm not entirely sure how to make it work, so I'll explain my expectation, and maybe someone can tell me how to fix it or tell me I'm thinking about it completely wrong.
I've created a VIP (as an IP Alias) in OPNsense at 192.168.0.50/32. What I want to do is use that VIP within Port Forwarding to the ports required for my control planes in Kubernetes so that it's routing can take over from there.
My control planes are DHCP (reserved by MAC) as follows:
k8s-cp-1 - 192.168.0.51
k8s-cp-2 - 192.168.0.52
k8s-cp-3 - 192.168.0.53
So the expectation is that if I forward ports 80 and 443 to 192.168.0.50, then .50 would represent the first control plane that responds, and if it goes down, one of the other 2 takes its place. I would also expect that if I ping 192.168.0.50, that I'd receive answers from either .51, .52, or .53.
Maybe I'm completely off base, but hopefully someone with experience with a similar issue can point me in the right direction. Thanks!
I've created a VIP (as an IP Alias) in OPNsense at 192.168.0.50/32. What I want to do is use that VIP within Port Forwarding to the ports required for my control planes in Kubernetes so that it's routing can take over from there.
My control planes are DHCP (reserved by MAC) as follows:
k8s-cp-1 - 192.168.0.51
k8s-cp-2 - 192.168.0.52
k8s-cp-3 - 192.168.0.53
So the expectation is that if I forward ports 80 and 443 to 192.168.0.50, then .50 would represent the first control plane that responds, and if it goes down, one of the other 2 takes its place. I would also expect that if I ping 192.168.0.50, that I'd receive answers from either .51, .52, or .53.
Maybe I'm completely off base, but hopefully someone with experience with a similar issue can point me in the right direction. Thanks!