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.
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.