Expose multiple udp ports (>5) internally on a pod running on GKE

12/16/2018

Background: We have a containerized service that processes up to 20 streams, listening on 20 different udp ports. We are running this on GKE and the stream source is on the same internal network but outside of the cluster. The streams need to be sent to a constant IP address. So if there are 30 streams needing processing, ideally we'd spin up 2 pods expose each using an internal load balancer with 20 ports opened on the first and another 10 opened on the second.

Limitation: GKE's internal load balancer allows only a maximum of 5 ports to be opened per forwarding rule. This implies spinning up more containers to process the same number of streams. For example, to process the 30 streams above we'd need to spin up 6 pods as opposed to 2 and consequently 6 load balancers as well. The cost of running the additional load balancers could add up quickly. Also, down the line if one stream requires additional ports to be opened to process, this will further reduce the number of streams that can be passed through to the pod.

Question: Is there an alternative method of exposing the pod to the source in the manner described? Can Alias IPs play a role here? Any other recommendations, even if it involves a redesign?

-- pbenjamin
google-kubernetes-engine
internal-load-balancer
kubernetes

0 Answers