1

I am running a service in GKE/Kubernetes that exposes a single UDP port at a staric IP address. (I've promoted the static IP address from an ephemeral one in GCE.) If I deploy it with fields as follows the service is reachable.

spec:
  type: LoadBalancer
  loadBalancerIP: <static-ip-address>

However, I don't plan to run more than a single replica of my service and I am not even sure if GKE's load balancers work with UDP, hence I'd like to try without one.

The following alternative configuration does not yet work. With it, the service comes up, but at a different IP address and hence not reachable from external as desired.

spec:
  type: NodePort
  externalIPs:
  - <static-IP-address>

So is running an externally visible service at an "own" static IP address without load balancer even possible, and if so how?

UPDATE Further progress indicates that the work balancer also works with UDP, but it still seems redundant.

  • Why don't you want to use a load balancer? With Kubernetes, your pod may not always live on the same node at the same ip address (for instance, when you want to update to a new version). Using a load balancer with a service means that you have an unchanging way to address your application across versions and machine failures/upgrades, even if you only plan to run a single copy of it. – Robert Bailey Jul 26 '16 at 14:22
  • @RobertBailey I wanted to get rid of it mostly because I'm not sure how a UDP load balancer does its job, but may leave it in for the reasons that you state. – Drux Jul 26 '16 at 16:10
  • 1
    An L3/4 load balancer will take incoming UDP packets and pick a backend to send them to. If you only have one backend, then all of the packets will end up there. Once you have multiple backends, then you will need to understand if the load balancer balances individual packets of packet flows (which are based on the 5-tuple of {source ip, dest ip, source port, dest port, protocol}). You should read this section to understand how GCP's UDP load balancing works. – Robert Bailey Jul 30 '16 at 5:01
0

An L3/4 load balancer will take incoming UDP packets and pick a backend to send them to. If you only have one backend, then all of the packets will end up there. Once you have multiple backends, then you will need to understand if the load balancer balances individual packets of packet flows (which are based on the 5-tuple of {source ip, dest ip, source port, dest port, protocol}). You should read this section to understand how GCP's UDP load balancing works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.