Consolidatng one blanket bug to track serveral sub-features to achieve highly available, scalable ingress model for bare-metal deployments.
ECMP/L3 LB consistent hash
Router -------------> L4 director-------------------> L7 proxy--------------> pod
or
ECMP/L3 LB consistent hash
Router -------------> L4 director-------------------> pod
I am working on a prototype. Will share once i have something in testable state, for feedback.
Here are the manual steps. Assuming 192.168.100.101 is the external IP and 10.1.1.56 is service endpoint
iptables -t mangle -A PREROUTING -d 192.168.100.101 -m tcp -p tcp --dport 80 -j MARK --set-mark 10
ipvsadm -A --fwmark-service 10 -s sh
ipvsadm -a --fwmark-service 10 -r 10.1.1.56 -i
get the pid of the pod by container id
docker inspect --format '{{.State.Pid}}' 292a9274a97d
add the tunnel interface inside the pod
nsenter -t 2358 -n ip tunnel add tunnel0 mode ipip local 10.1.1.56
add the vip to tunl0 interface
nsenter -t 2358 -n ip addr add 192.168.100.101 dev tunl0
Last disable rp_filter on container, as packet arrives on tunnel interface and leaves on the eth0
nsenter -t 2358 -n sysctl -w net.ipv4.conf.all.rp_filter=0
Support for DSR: cloudnativelabs/kube-router@6d43268
Support for external IP鈥檚: cloudnativelabs/kube-router@ba7697b
Support for advertising external IP鈥檚: to BGP peers cloudnativelabs/kube-router@4ca0afa
You gentlemen are on 馃敟 please do keep it up!
We have all pieces of puzzle for this feature. I will use #88 to document how to use these individual features.
Only thing that could have been better is use proper consistent hashing, which is not available in stock LVS. We will need patched version.
For now SH (Source Hashing) support has been added in https://github.com/cloudnativelabs/kube-router/commit/77f45e356ba58c81f45f54d98fe8293ad586f38b
Most helpful comment
I am working on a prototype. Will share once i have something in testable state, for feedback.
Here are the manual steps. Assuming
192.168.100.101is the external IP and10.1.1.56is service endpointget the pid of the pod by container id
add the tunnel interface inside the pod
add the vip to tunl0 interface
Last disable rp_filter on container, as packet arrives on tunnel interface and leaves on the eth0