# UDPRoute Type of document: How-to guide Product: NGINX Gateway Fabric --- Learn how to configure a UDPRoute to handle a UDP connection between NGINX Gateway Fabric and the backend applications. ## Overview UDPRoute enables you to expose and route UDP traffic through a Gateway. In this guide, you’ll configure a Gateway with a UDP listener and attach a UDPRoute to it. The listener defines the external UDP port, and the UDPRoute specifies the backend services; packets arriving on the listener’s port are forwarded to the backend applications. ## Note on Gateway API Experimental Features **Note:** UDPRoute is a Gateway API resource from the experimental release channel. To use Gateway API experimental resources, the Gateway API resources from the experimental channel must be installed before deploying NGINX Gateway Fabric. Additionally, NGINX Gateway Fabric must have experimental features enabled. **Note:** As noted in the [Gateway API documentation](https://gateway-api.sigs.k8s.io/guides/#install-experimental-channel), future releases of the Gateway API can include breaking changes to experimental resources and fields. To install the Gateway API resources from the experimental channel, run the following: ```shell kubectl kustomize "https://github.com/nginx/nginx-gateway-fabric/config/crd/gateway-api/experimental?ref=v" | kubectl apply -f - ``` **Note:** If you plan to use the `edge` version of NGINX Gateway Fabric, you can replace the version in `ref` with `main`, for example `ref=main`. To enable experimental features on NGINX Gateway Fabric: Using Helm: Set `nginxGateway.gwAPIExperimentalFeatures.enable` to true. An example can be found in the [Installation with Helm](/ngf/install/helm.md#custom-installation-options) guide. Using Kubernetes manifests: Add the `--gateway-api-experimental-features` command-line flag to the deployment manifest args. An example can be found in the [Installation with Kubernetes manifests](/ngf/install/manifests.md#3-deploy-nginx-gateway-fabric) guide. ## Before you begin - [Install](/ngf/install/) NGINX Gateway Fabric with experimental features enabled. ## Setup Create a simple application `coredns` by copying and pasting the following block into your terminal: ```yaml kubectl apply -f - < 53/UDP 13m ``` Create a Gateway with UDP listener: ```yaml kubectl apply -f - < ``` **Note:** In a production environment, you should have a DNS record for the external IP address that is exposed, and it should refer to the hostname that the gateway will forward for. Create UDPRoute for routing to `coredns` application: ```yaml kubectl apply -f - <> DiG 9.10.6 <<>> ${GW_IP} 53 cafe.example.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13260 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;localhost. IN A ;; ANSWER SECTION: localhost. 600 IN A 127.0.0.1 ;; Query time: 136 msec ;; SERVER: 192.168.72.180#53(192.168.72.180) ;; WHEN: Thu Jan 08 21:44:46 MST 2026 ;; MSG SIZE rcvd: 54 ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 32036 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;53. IN A ;; Query time: 141 msec ;; SERVER: 192.168.72.180#53(192.168.72.180) ;; WHEN: Thu Jan 08 21:44:47 MST 2026 ;; MSG SIZE rcvd: 31 ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16210 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;cafe.example.com. IN A ;; AUTHORITY SECTION: example.com. 900 IN SOA elliott.ns.cloudflare.com. dns.cloudflare.com. 2393120882 10000 2400 604800 1800 ;; Query time: 159 msec ;; SERVER: 192.168.72.180#53(192.168.72.180) ;; WHEN: Thu Jan 08 21:44:47 MST 2026 ;; MSG SIZE rcvd: 107 ``` ## Further Readings - [UDPRoute](https://gateway-api.sigs.k8s.io/reference/spec/#udproute)