digitalocean / DOKS

Managed Kubernetes designed for simple and cost effective container orchestration.
https://www.digitalocean.com/products/kubernetes/
Apache License 2.0
80 stars 4 forks source link

Feature request: UDP support in Load Balancers #30

Closed bergkvist closed 2 years ago

bergkvist commented 2 years ago

I want to use Wireguard (VPN) to create a persistent connection between a Kubernetes cluster and a server hosted elsewhere.

Wireguard uses UDP for communication, but UDP is not supported in the DigitalOcean load balancers. A NodePort Service is not ideal because Node IPs are not static, and will change when the nodes are recycled (like during a Kubernetes version upgrade). I want to use a LoadBalancer because this gives me a static IP.

apiVersion: v1
kind: Service
metadata:
  name: wireguard-load-balancer
spec:
  type: LoadBalancer
  selector:
    app: wireguard
  ports:
  - port: 51820
    targetPort: wireguard-port
    protocol: UDP
timoreimann commented 2 years ago

UDP is now supported on more recent clusters. See https://docs.digitalocean.com/products/kubernetes/how-to/configure-load-balancers/#protocol for details.