Skip to content

Commit d2d126f

Browse files
author
Kate Osborn
committed
Add links to spec
1 parent c49846d commit d2d126f

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

docs/guides/routing-traffic-to-your-app.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,10 @@ installation of NGINX Kubernetes Gateway creates a GatewayClass with the name `n
142142
only configure Gateways with a `gatewayClassName` of `nginx` unless you change the name via the `--gatewayclass`
143143
[command-line flag](/docs/cli-help.md#static-mode).
144144

145-
We specify a listener on the Gateway to open an entry point on the cluster. In this case, since the coffee application
146-
accepts HTTP requests, we create an HTTP listener, named `http`, that listens on port 80.
145+
We specify
146+
a [listener](https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1beta1.Listener) on
147+
the Gateway to open an entry point on the cluster. In this case, since the coffee application accepts HTTP requests, we
148+
create an HTTP listener, named `http`, that listens on port 80.
147149

148150
By default, Gateways only allow routes (such as HTTPRoutes) to attach if they are in the same namespace as the Gateway.
149151
If you want to change this behavior, you can set
@@ -174,17 +176,20 @@ spec:
174176
EOF
175177
```
176178

177-
To attach the `coffee` HTTPRoute to the `cafe` Gateway, we specify the Gateway name in the `parentRefs` field. The
178-
attachment will succeed if the hostnames and protocol in the HTTPRoute are allowed by at least one of the
179+
To attach the `coffee` HTTPRoute to the `cafe` Gateway, we specify the Gateway name in
180+
the [`parentRefs`](https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1beta1.CommonRouteSpec)
181+
field. The attachment will succeed if the hostnames and protocol in the HTTPRoute are allowed by at least one of the
179182
Gateway's listeners.
180183

181-
The `hostnames` field allows you to list the hostnames that the HTTPRoute matches. In this case, incoming requests
182-
handled by the `http` listener with the HTTP host header `cafe.example.com` will match this HTTPRoute and will be routed
183-
according to the rules in the spec.
184+
The [`hostnames`](https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1beta1.HTTPRouteSpec)
185+
field allows you to list the hostnames that the HTTPRoute matches. In this case, incoming requests handled by the `http`
186+
listener with the HTTP host header `cafe.example.com` will match this HTTPRoute and will be routed according to the
187+
rules in the spec.
184188

185-
The `rules` field defines routing rules for the HTTPRoute. A rule is selected if the request satisfies one of the
186-
rule's `matches`. To forward traffic for all paths to the coffee Service we specify a match with the PathPrefix `/` and
187-
target the coffee Service using the `backendRef` field.
189+
The [`rules`](https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1beta1.HTTPRouteRule)
190+
field defines routing rules for the HTTPRoute. A rule is selected if the request satisfies one of the rule's `matches`.
191+
To forward traffic for all paths to the coffee Service we specify a match with the PathPrefix `/` and target the coffee
192+
Service using the `backendRef` field.
188193

189194
## Test the Configuration
190195

0 commit comments

Comments
 (0)