Closed thekalinga closed 7 years ago
If I understood you correctly, the requests to the floating IP will reach one of the loadbalancers, that will be redirected to one of the pods. So no problem, this should work as expected.
But take in mind that:
@jcmoraisjr You could use the same stickness session implemented in NGINX, with the first set cookie containing the route that the Frontend took to the pod.
https://github.com/kubernetes/ingress/blob/master/examples/affinity/cookie/nginx/README.md
Anyway don't know if HAProxy supports this kind of affinity :)
Closing this issue. You can add a new comment if you have any doubt.
unfortunately, kube-keepalived works only with kubernetes services, while HAProxy DaemonSet uses "hostNetwork". I solved the issue by installing keepalived directly on the Nodes (HAProxy Pods needs to be scheduled exactly on these Nodes which can be controller via nodeSelector labels). An example of keepalived configuration which works in this case:
vrrp_script check_haproxy {
script "pidof haproxy"
interval 5
fall 2
rise 2
}
vrrp_instance VI_1 {
state MASTER
interface eth1
virtual_router_id 51
priority 101
advert_int 1
track_script {
check_haproxy
}
virtual_ipaddress {
192.168.2.5
}
}
@antonmatsiuk best solution is to run keepliaved as side care container to HAPROXY.
I see that there is a project that enables keep alived within kubernetes. https://github.com/kubernetes/contrib/tree/master/keepalived-vip
Just wanted to check if the following topology for high available load balancer configuration is supported with floating ips