How Can I Use Kubernetes node as Reverse Proxy _

8/2/2019

I have 1 master and 1 slave node.On the slave node i have 2 interface card(enp0s3 and enp0s8). Their IP's are: enp0s3 192.168.1.71 enp0s8 192.168.15.72

I user ingress load balancer as ingress and inside node there must be 2 pods.This pods should have haproxy and they should forward traffic only to specific network card.

How can i achieve this ?

![1] https://pasteboard.co/IqOEI3K.jpg

System is OK when i try with 2 nodes but i need 1 node multiple interface solution.

![2] https://pasteboard.co/IqOHkoH.jpg

-- akuscu
haproxy
kubernetes
networking
proxy

1 Answer

8/2/2019

It has nothing to Kubernetes - packet flow is determined by routing configuration on worker node so if you configure that some subnet is reachable by enp0s3 and other subnet by enp0s8 your linux system on worker machine will pass traffic to proper interface.

See e.g. https://serverfault.com/questions/123553/how-to-set-the-preferred-network-interface-in-linux

-- Jakub Bujny
Source: StackOverflow