Kubernetes UDP response blocked by service whether from another pod

9/30/2021

My system is composed by a UDP client that sends a UDP ping message to a server spawned by a Kubernetes deployment. The server is composed by 2 replicas behind a metallb load balancer service.

The actual message routing acts as follow:

  • One of the pod (say POD1) receives the message
  • POD1 store it (with source ip and port) inside a cache
  • POD1 enters in a idle status
  • The other pod of the replicaset (POD2) get the cached message and source address
  • POD2 replies
  • POD2 receives a port unreachable ICMP error.

I think that, since my UDP response source IP is different from the destination IP of the original request, the service cannot map the final destination IP.

I feel I'm missing an annotation that solves my issue. Is metallb the responsible of the port mapping? Am I forced to use a UDP proxy server instead? If so can you share an already implemented solution?

-- RugUrmet
cluster-computing
kubernetes
metallb
service
udp

0 Answers