@@ -8,7 +8,7 @@ docs: DOCS-000
88This is a guide for getting started with NGINX Gateway Fabric. It explains how to:
99
1010- Set up a [ kind (Kubernetes in Docker)] ( https://kind.sigs.k8s.io/ ) cluster
11- - Install [ NGINX Gateway Fabric] ( https://blog.nginx.org/blog/5-things-to-know-about- nginx-gateway-fabric ) with [ NGINX] ( https://nginx.org/ )
11+ - Install [ NGINX Gateway Fabric] ( https://github.com/nginxinc/ nginx-gateway-fabric ) with [ NGINX] ( https://nginx.org/ )
1212- Test NGINX Gateway Fabric with an example application
1313
1414By following the steps in order, you will finish with a functional NGINX Gateway Fabric cluster.
@@ -56,17 +56,17 @@ kind create cluster --config cluster-config.yaml
5656``` text
5757Creating cluster "kind" ...
5858 ✓ Ensuring node image (kindest/node:v1.31.0) 🖼
59- ✓ Preparing nodes 📦
60- ✓ Writing configuration 📜
61- ✓ Starting control-plane 🕹️
62- ✓ Installing CNI 🔌
63- ✓ Installing StorageClass 💾
59+ ✓ Preparing nodes 📦
60+ ✓ Writing configuration 📜
61+ ✓ Starting control-plane 🕹️
62+ ✓ Installing CNI 🔌
63+ ✓ Installing StorageClass 💾
6464Set kubectl context to "kind-kind"
6565You can now use your cluster with:
6666
6767kubectl cluster-info --context kind-kind
6868
69- Have a question, bug, or feature request? Let us know! https://kind.sigs.k8s.io/#community 🙂
69+ Thanks for using kind! 😊
7070```
7171
7272{{< note >}}
@@ -117,7 +117,7 @@ helm install ngf oci://ghcr.io/nginxinc/charts/nginx-gateway-fabric --create-nam
117117Pulled: ghcr.io/nginxinc/charts/nginx-gateway-fabric:1.4.0
118118Digest: sha256:9bbd1a2fcbfd5407ad6be39f796f582e6263512f1f3a8969b427d39063cc6fee
119119NAME: ngf
120- LAST DEPLOYED: Fri Oct 11 16:57:20 2024
120+ LAST DEPLOYED: Mon Oct 21 14:45:14 2024
121121NAMESPACE: nginx-gateway
122122STATUS: deployed
123123REVISION: 1
@@ -182,7 +182,7 @@ service/nginx-gateway created
182182{{< warning >}}
183183The NodePort resource must be deployed in the same namespace as NGINX Gateway Fabric.
184184
185- If you are making customizations, ensure your `labels:` and `selectors:` also match the labels on the NGINX Gateway Fabric Deployment.
185+ If you are making customizations, ensure your `labels:` and `selectors:` also match the labels of the NGINX Gateway Fabric Deployment.
186186{{< /warning >}}
187187
188188---
@@ -222,8 +222,8 @@ kubectl -n default get pods
222222` ` `
223223` ` ` text
224224NAME READY STATUS RESTARTS AGE
225- coffee-6db967495b-dvg5w 1/1 Running 0 80s
226- tea-7b7d6c947d-8xmhm 1/1 Running 0 80s
225+ coffee-6db967495b-wk2mm 1/1 Running 0 10s
226+ tea-7b7d6c947d-d4qcf 1/1 Running 0 10s
227227` ` `
228228
229229---
@@ -257,6 +257,10 @@ httproute.gateway.networking.k8s.io/coffee created
257257httproute.gateway.networking.k8s.io/tea created
258258` ` `
259259
260+ ---
261+
262+ # ## Verify the configuration
263+
260264You can check that all of the expected services are available using `kubectl get` :
261265
262266` ` ` shell
@@ -271,13 +275,207 @@ kube-system kube-dns ClusterIP 10.96.0.10 <none> 53/UDP
271275nginx-gateway nginx-gateway NodePort 10.96.186.45 <none> 80:31437/TCP,443:31438/TCP 3m6s
272276` ` `
273277
278+ You can also use `kubectl describe` on the new resources to check their status :
279+
280+ ` ` ` shell
281+ kubectl describe httproutes
282+ ` ` `
283+ ` ` ` text
284+ Name: coffee
285+ Namespace: default
286+ Labels: <none>
287+ Annotations: <none>
288+ API Version: gateway.networking.k8s.io/v1
289+ Kind: HTTPRoute
290+ Metadata:
291+ Creation Timestamp: 2024-10-21T13:46:51Z
292+ Generation: 1
293+ Resource Version: 821
294+ UID: cc591089-d3aa-44d3-a851-e2bbfa285029
295+ Spec:
296+ Hostnames:
297+ cafe.example.com
298+ Parent Refs:
299+ Group: gateway.networking.k8s.io
300+ Kind: Gateway
301+ Name: gateway
302+ Section Name: http
303+ Rules:
304+ Backend Refs:
305+ Group:
306+ Kind: Service
307+ Name: coffee
308+ Port: 80
309+ Weight: 1
310+ Matches:
311+ Path:
312+ Type: PathPrefix
313+ Value: /coffee
314+ Status:
315+ Parents:
316+ Conditions:
317+ Last Transition Time: 2024-10-21T13:46:51Z
318+ Message: The route is accepted
319+ Observed Generation: 1
320+ Reason: Accepted
321+ Status: True
322+ Type: Accepted
323+ Last Transition Time: 2024-10-21T13:46:51Z
324+ Message: All references are resolved
325+ Observed Generation: 1
326+ Reason: ResolvedRefs
327+ Status: True
328+ Type: ResolvedRefs
329+ Controller Name: gateway.nginx.org/nginx-gateway-controller
330+ Parent Ref:
331+ Group: gateway.networking.k8s.io
332+ Kind: Gateway
333+ Name: gateway
334+ Namespace: default
335+ Section Name: http
336+ Events: <none>
337+
338+
339+ Name: tea
340+ Namespace: default
341+ Labels: <none>
342+ Annotations: <none>
343+ API Version: gateway.networking.k8s.io/v1
344+ Kind: HTTPRoute
345+ Metadata:
346+ Creation Timestamp: 2024-10-21T13:46:51Z
347+ Generation: 1
348+ Resource Version: 823
349+ UID: d72d2a19-1c4d-48c4-9808-5678cff6c331
350+ Spec:
351+ Hostnames:
352+ cafe.example.com
353+ Parent Refs:
354+ Group: gateway.networking.k8s.io
355+ Kind: Gateway
356+ Name: gateway
357+ Section Name: http
358+ Rules:
359+ Backend Refs:
360+ Group:
361+ Kind: Service
362+ Name: tea
363+ Port: 80
364+ Weight: 1
365+ Matches:
366+ Path:
367+ Type: Exact
368+ Value: /tea
369+ Status:
370+ Parents:
371+ Conditions:
372+ Last Transition Time: 2024-10-21T13:46:51Z
373+ Message: The route is accepted
374+ Observed Generation: 1
375+ Reason: Accepted
376+ Status: True
377+ Type: Accepted
378+ Last Transition Time: 2024-10-21T13:46:51Z
379+ Message: All references are resolved
380+ Observed Generation: 1
381+ Reason: ResolvedRefs
382+ Status: True
383+ Type: ResolvedRefs
384+ Controller Name: gateway.nginx.org/nginx-gateway-controller
385+ Parent Ref:
386+ Group: gateway.networking.k8s.io
387+ Kind: Gateway
388+ Name: gateway
389+ Namespace: default
390+ Section Name: http
391+ Events: <none>
392+ ` ` `
393+
394+ ` ` ` shell
395+ kubectl describe gateways
396+ ` ` `
397+ ` ` ` text
398+ Name: gateway
399+ Namespace: default
400+ Labels: <none>
401+ Annotations: <none>
402+ API Version: gateway.networking.k8s.io/v1
403+ Kind: Gateway
404+ Metadata:
405+ Creation Timestamp: 2024-10-21T13:46:36Z
406+ Generation: 1
407+ Resource Version: 824
408+ UID: 2ae8ec42-70eb-41a4-b249-3e47177aea48
409+ Spec:
410+ Gateway Class Name: nginx
411+ Listeners:
412+ Allowed Routes:
413+ Namespaces:
414+ From: Same
415+ Hostname: *.example.com
416+ Name: http
417+ Port: 80
418+ Protocol: HTTP
419+ Status:
420+ Addresses:
421+ Type: IPAddress
422+ Value: 10.244.0.5
423+ Conditions:
424+ Last Transition Time: 2024-10-21T13:46:51Z
425+ Message: Gateway is accepted
426+ Observed Generation: 1
427+ Reason: Accepted
428+ Status: True
429+ Type: Accepted
430+ Last Transition Time: 2024-10-21T13:46:51Z
431+ Message: Gateway is programmed
432+ Observed Generation: 1
433+ Reason: Programmed
434+ Status: True
435+ Type: Programmed
436+ Listeners:
437+ Attached Routes: 2
438+ Conditions:
439+ Last Transition Time: 2024-10-21T13:46:51Z
440+ Message: Listener is accepted
441+ Observed Generation: 1
442+ Reason: Accepted
443+ Status: True
444+ Type: Accepted
445+ Last Transition Time: 2024-10-21T13:46:51Z
446+ Message: Listener is programmed
447+ Observed Generation: 1
448+ Reason: Programmed
449+ Status: True
450+ Type: Programmed
451+ Last Transition Time: 2024-10-21T13:46:51Z
452+ Message: All references are resolved
453+ Observed Generation: 1
454+ Reason: ResolvedRefs
455+ Status: True
456+ Type: ResolvedRefs
457+ Last Transition Time: 2024-10-21T13:46:51Z
458+ Message: No conflicts
459+ Observed Generation: 1
460+ Reason: NoConflicts
461+ Status: False
462+ Type: Conflicted
463+ Name: http
464+ Supported Kinds:
465+ Group: gateway.networking.k8s.io
466+ Kind: HTTPRoute
467+ Group: gateway.networking.k8s.io
468+ Kind: GRPCRoute
469+ Events: <none>
470+ ` ` `
471+
274472---
275473
276474# # Test NGINX Gateway Fabric
277475
278476The cluster was configured with port `8080` as the `containerPort` value, alongside the `nodePort` value of the NodePort service.
279477
280- Since the NodePort `targetPort` values match the _tea_ and _coffee_ service `port` values, no port forwarding is required .
478+ Traffic flows through NGINX Gateway Fabric : setting the _tea_ and _coffee_ service `port` values to match the NodePort ports makes them accessible .
281479
282480You can use `curl` to test the new services by targeting the hostname (_cafe.example.com_) with the _/coffee_ and _/tea_ paths :
283481
@@ -286,21 +484,21 @@ curl --resolve cafe.example.com:8080:127.0.0.1 http://cafe.example.com:8080/coff
286484` ` `
287485` ` ` text
288486Server address: 10.244.0.6:8080
289- Server name: coffee-6db967495b-984mx
290- Date: 17 /Oct/2024:15:50:22 +0000
487+ Server name: coffee-6db967495b-wk2mm
488+ Date: 21 /Oct/2024:13:52:13 +0000
291489URI: /coffee
292- Request ID: 8ad83b06ea42b996ad6bd28032b38e28
490+ Request ID: fb226a54fd94f927b484dd31fb30e747
293491` ` `
294492
295493` ` ` shell
296- curl --resolve cafe.example.com:8080:127.0.0.1 http://cafe.example.com:8080/coffee
494+ curl --resolve cafe.example.com:8080:127.0.0.1 http://cafe.example.com:8080/tea
297495` ` `
298496` ` ` text
299- Server address: 10.244.0.6 :8080
300- Server name: coffee-6db967495b-984mx
301- Date: 17 /Oct/2024:15:50:29 +0000
302- URI: /coffee
303- Request ID: 2dfc85564dd5b5dad7e62b980bb60ee1
497+ Server address: 10.244.0.7 :8080
498+ Server name: tea-7b7d6c947d-d4qcf
499+ Date: 21 /Oct/2024:13:52:17 +0000
500+ URI: /tea
501+ Request ID: 43882f2f5794a1ee05d2ea017a035ce3
304502` ` `
305503
306504---
0 commit comments