Expose UDP applications
What you’ll accomplish
Section titled “What you’ll accomplish”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.
Before you begin
Section titled “Before you begin”UDS Core supports two Gateway modes for UDP exposes:
- Default Gateway: a single shared Gateway managed by UDS Core, used when you omit the
gatewayfield 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
gatewayfield. Use this when you need an isolated proxy, a dedicated load balancer IP, or independent lifecycle management for the Gateway.
Prerequisites
Section titled “Prerequisites”- 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
-
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: corerepository: registry.defenseunicorns.com/public/coreref: x.x.x-upstreamoptionalComponents:- envoy-gateway # The Envoy Gateway controller- envoy-default-gateway # The default Gateway's namespace, only needed for default-Gateway modeCreate and deploy the bundle:
Terminal window uds create --confirm && uds deploy uds-bundle-*.tar.zst --confirm -
Expose your service over UDP
Set
protocol: UDPon an expose entry. ThePackageCR is denied ifhost,domain,advancedHTTP, ormatchare set on a UDP entry; routing is byportonly.Omit
gatewayto route through the shared, UDS Core managed default Gateway:uds-package.yaml apiVersion: uds.dev/v1alpha1kind: Packagemetadata:name: my-udp-appnamespace: my-udp-appspec:network:expose:- service: my-udp-app-serviceselector:app.kubernetes.io/name: my-udp-appprotocol: UDPport: 5000This routes UDP traffic on port 5000 through the default Gateway’s LoadBalancer service.
Set
gatewayto the name of a Gateway you manage yourself. UDS Core uses this value as both the Gateway name and its namespace.uds-package.yaml apiVersion: uds.dev/v1alpha1kind: Packagemetadata:name: my-udp-appnamespace: my-udp-appspec:network:expose:- service: my-udp-app-serviceselector:app.kubernetes.io/name: my-udp-appprotocol: UDPgateway: my-custom-gatewayport: 5000 -
Deploy your application
(Recommended) Include the
PackageCR in your Zarf package and create/deploy. See Packaging applications for general packaging guidance.Terminal window uds zarf package create --confirmuds zarf package deploy zarf-package-*.tar.zst --confirmOr apply the
PackageCR directly for quick testing:Terminal window uds zarf tools kubectl apply -f uds-package.yaml
Verification
Section titled “Verification”Check that the Package CR was reconciled:
uds zarf tools kubectl get package my-udp-app -n my-udp-appFind 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):
uds zarf tools kubectl get svc -n envoy-default-gatewayTest the connection with a UDP client on the load balancer IP and the port from your Package CR:
echo "ping" | nc -u <load-balancer-ip> 5000Troubleshooting
Section titled “Troubleshooting”Problem: Package CR shows no endpoint
Section titled “Problem: Package CR shows no endpoint”Symptom: The Package CR reconciles but ENDPOINTS is empty or the status never becomes ready.
Solution:
- Confirm
envoy-gateway(andenvoy-default-gateway, for default-Gateway mode) are listed underoptionalComponentsin 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: ambientlabel and was deployed via a Zarf package
Problem: Connection timeout
Section titled “Problem: Connection timeout”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
Related documentation
Section titled “Related documentation”- Networking & Service Mesh Concepts - how the service mesh, gateways, and network policies work together in UDS Core
PackageCR Reference - full CR schema and field reference for network, SSO, and monitoring configuration- Expose applications on gateways - Expose HTTP applications through the Istio tenant or admin gateway.
- Set up non-HTTP ingress - Expose TCP applications through Istio.
- Create a custom gateway - Deploy an Istio gateway with independent domain, TLS, and security controls.