Skip to content
Unified Defense StackUnified Defense Stack

Expose UDP applications

After completing this guide, your application will be accessible over UDP through Envoy Gateway. Istio does not support UDP ingress, so UDS Core routes protocol: UDP expose entries through a separate Envoy Gateway control plane instead of the Istio tenant or admin gateways.

UDS Core supports two Gateway modes for UDP exposes:

  • Default Gateway: a single shared Gateway managed by UDS Core, used when you omit the gateway field on an expose entry. Simplest option; suitable when your application doesn’t need an isolated Gateway.
  • User-managed Gateway: a Gateway you deploy and manage yourself, referenced by name in the gateway field. Use this when you need an isolated proxy, a dedicated load balancer IP, or independent lifecycle management for the Gateway.
  • UDS CLI installed
  • UDS Registry account created and authenticated locally with a read token
  • Access to a Kubernetes cluster with UDS Core deployed
  • An application with a service listening on a UDP port
  • Familiarity with Zarf packages and UDS Bundles
  1. Enable Envoy Gateway in your UDS Core bundle

    Envoy Gateway is not deployed by default. Enable the controller and the default Gateway namespace by adding both as optional components:

    uds-bundle.yaml
    packages:
    - name: core
    repository: registry.defenseunicorns.com/public/core
    ref: x.x.x-upstream
    optionalComponents:
    - envoy-gateway # The Envoy Gateway controller
    - envoy-default-gateway # The default Gateway's namespace, only needed for default-Gateway mode

    Create and deploy the bundle:

    Terminal window
    uds create --confirm && uds deploy uds-bundle-*.tar.zst --confirm
  2. Expose your service over UDP

    Set protocol: UDP on an expose entry. The Package CR is denied if host, domain, advancedHTTP, or match are set on a UDP entry; routing is by port only.

    Omit gateway to route through the shared, UDS Core managed default Gateway:

    uds-package.yaml
    apiVersion: uds.dev/v1alpha1
    kind: Package
    metadata:
    name: my-udp-app
    namespace: my-udp-app
    spec:
    network:
    expose:
    - service: my-udp-app-service
    selector:
    app.kubernetes.io/name: my-udp-app
    protocol: UDP
    port: 5000

    This routes UDP traffic on port 5000 through the default Gateway’s LoadBalancer service.

  3. Deploy your application

    (Recommended) Include the Package CR in your Zarf package and create/deploy. See Packaging applications for general packaging guidance.

    Terminal window
    uds zarf package create --confirm
    uds zarf package deploy zarf-package-*.tar.zst --confirm

    Or apply the Package CR directly for quick testing:

    Terminal window
    uds zarf tools kubectl apply -f uds-package.yaml

Check that the Package CR was reconciled:

Terminal window
uds zarf tools kubectl get package my-udp-app -n my-udp-app

Find the external address of the Gateway’s load balancer service (envoy-default-gateway namespace for default-Gateway mode, or your custom Gateway’s namespace for user-managed mode):

Terminal window
uds zarf tools kubectl get svc -n envoy-default-gateway

Test the connection with a UDP client on the load balancer IP and the port from your Package CR:

Terminal window
echo "ping" | nc -u <load-balancer-ip> 5000

Symptom: The Package CR reconciles but ENDPOINTS is empty or the status never becomes ready.

Solution:

  • Confirm envoy-gateway (and envoy-default-gateway, for default-Gateway mode) are listed under optionalComponents in your bundle
  • Check the Envoy Gateway controller is running: uds zarf tools kubectl get pods -n envoy-gateway-system
  • For user-managed Gateways, confirm the Gateway’s namespace has the istio.io/dataplane-mode: ambient label and was deployed via a Zarf package

Symptom: UDP client hangs without a response.

Solution:

  • Verify the network policy allows ingress from the Envoy Gateway proxy: uds zarf tools kubectl get package my-udp-app -n my-udp-app
  • Confirm the destination service and port are correct: uds zarf tools kubectl get svc -n my-udp-app
  • Check the managed proxy pod logs in the Gateway’s namespace for xDS connection errors