Maintaining original source and destination headers for incoming UDP data in kubernetes cluster

5/20/2021

I have the below kubernetes cluster configuration for my application:

NodeA <master>

NodeB <worker1> (processesorService)

NodeC <worker2>

I have a service running on NodeB (processesorService) which processes incoming packets send by an external service (Say senderService). I also have the service.type set to LoadBalancer.

My application was previously a monolith where the the data sent by senderService was received and processed at the same node thus maintaining the source and destination IP on the incoming packets. I am now moving my application architecture so that it can be deployed on kubernetes. My understanding is that since I have set the service.type to LoadBalancer, the source and destination IP on the incoming packets will be replaced before forwarding to the processingService. Is there any way I can maintain the original source and destination IP on the packets as it is required by my application ?

-- Moses
kubernetes
networking
nginx-ingress

0 Answers