Skip to content

Commit c976027

Browse files
authored
feat: Migrate NGINX Gateway Fabric documentation into repository (#81)
With the newly open source documentation repository, we can now consolidate all NGINX documentation into one place. This has a lots of benefits which include but are not limited to more effective content re-use, pipeline engineering and style enforcement. This commit adds all of the content for NGINX Gateway Fabric, and updates all relevant folder and file names, including link references. Once this content has been successfully deployed, a PR to remove all documentation traces and tooling will be opened in the Gateway Fabric repository, decoupling the documentation fully. It also updates the frontmatter of every single page in the documentation set. They are now all consistent in their fields and formatting, and a handful of IA or heading changes have been made as low-hanging fruit to bring the documentation set closer to full consistency.
1 parent 10379fd commit c976027

File tree

76 files changed

+11330
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+11330
-4
lines changed

config/_default/config.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ pygmentsUseClasses = true
77
enableGitInfo = true
88

99
[permalinks]
10+
amplify = '/nginx-amplify/:sections[1:]/:filename'
1011
controller = '/nginx-controller/:sections[1:]/:filename'
12+
mesh = '/nginx-service-mesh/:sections[1:]/:filename'
1113
modsec-waf = '/nginx-waf/:sections[1:]/:filename'
1214
nap-dos = '/nginx-app-protect-dos/:sections[1:]/:filename'
1315
nap-waf = '/nginx-app-protect-waf/:sections[1:]/:filename'
14-
nms = '/nginx-management-suite/:sections[1:]/:filename'
15-
amplify = '/nginx-amplify/:sections[1:]/:filename'
16-
mesh = '/nginx-service-mesh/:sections[1:]/:filename'
16+
ngf = '/nginx-gateway-fabric/:sections[1:]/:filename'
1717
nim = '/nginx-instance-manager/:sections[1:]/:filename'
18+
nms = '/nginx-management-suite/:sections[1:]/:filename'
1819

1920
[caches]
2021
[caches.modules]
@@ -36,7 +37,7 @@ enableGitInfo = true
3637
buildtype = "webdocs"
3738
RSSLink = "/index.xml"
3839
author = "NGINX Inc." # add your company name
39-
github = "nginxinc" # add your github profile name
40+
github = "nginx" # add your github profile name
4041
twitter = "@nginx" # add your twitter profile
4142
noindex_kinds = [
4243
"taxonomy",

content/includes/ngf/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
headless: true
3+
---
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
docs: "DOCS-1441"
3+
---
4+
5+
To avoid client service interruptions when upgrading NGINX Gateway Fabric, you can configure [`PreStop` hooks](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/) to delay terminating the NGINX Gateway Fabric pod, allowing the pod to complete certain actions before shutting down. This ensures a smooth upgrade without any downtime, also known as a zero downtime upgrade.
6+
7+
For an in-depth explanation of how Kubernetes handles pod termination, see the [Termination of Pods](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination) topic on their official website.
8+
9+
{{<note>}}Keep in mind that NGINX won't shut down while WebSocket or other long-lived connections are open. NGINX will only stop when these connections are closed by the client or the backend. If these connections stay open during an upgrade, Kubernetes might need to shut down NGINX forcefully. This sudden shutdown could interrupt service for clients.{{</note>}}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
docs: "DOCS-1440"
3+
---
4+
5+
Set `terminationGracePeriodSeconds` to a value that is equal to or greater than the `sleep` duration specified in the `preStop` hook (default is `30`). This setting prevents Kubernetes from terminating the pod before before the `preStop` hook has completed running.
6+
7+
```yaml
8+
terminationGracePeriodSeconds: 50
9+
```
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: "Expose NGINX Gateway Fabric"
3+
weight: 300
4+
docs: "DOCS-1427"
5+
---
6+
7+
There are two options for accessing NGINX Gateway Fabric depending on the type of LoadBalancer service you chose during installation:
8+
9+
- If the LoadBalancer type is `NodePort`, Kubernetes will randomly allocate two ports on every node of the cluster.
10+
To access the NGINX Gateway Fabric, use an IP address of any node of the cluster along with the two allocated ports.
11+
12+
{{<tip>}} Read more about the type NodePort in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport). {{</tip>}}
13+
14+
- If the LoadBalancer type is `LoadBalancer`:
15+
16+
- For GCP or Azure, Kubernetes will allocate a cloud load balancer for load balancing the NGINX Gateway Fabric pods.
17+
Use the public IP of the load balancer to access NGINX Gateway Fabric.
18+
- For AWS, Kubernetes will allocate a Network Load Balancer (NLB) in TCP mode with the PROXY protocol enabled to pass
19+
the client's information (the IP address and the port).
20+
21+
Use the public IP of the load balancer to access NGINX Gateway Fabric. To get the public IP which is reported in the `EXTERNAL-IP` column:
22+
23+
- For GCP or Azure, run:
24+
25+
```shell
26+
kubectl get svc nginx-gateway -n nginx-gateway
27+
```
28+
29+
- In AWS, the NLB (Network Load Balancer) DNS (directory name system) name will be reported by Kubernetes instead of a public IP. To get the DNS name, run:
30+
31+
```shell
32+
kubectl get svc nginx-gateway -n nginx-gateway
33+
```
34+
35+
{{< note >}} We recommend using the NLB DNS whenever possible, but for testing purposes, you can resolve the DNS name to get the IP address of the load balancer:
36+
37+
```shell
38+
nslookup <dns-name>
39+
```
40+
41+
{{< /note >}}
42+
43+
{{<tip>}} Learn more about type LoadBalancer in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/services-networking/service/#type-loadbalancer).
44+
45+
For AWS, additional options regarding an allocated load balancer are available, such as its type and SSL
46+
termination. Read the [Kubernetes documentation](https://kubernetes.io/docs/concepts/services-networking/service/#type-loadbalancer) to learn more.
47+
{{</tip>}}
48+
49+
{{<important>}}By default Helm and manifests configure NGINX Gateway Fabric on ports `80` and `443`, affecting any gateway [listeners](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1.Listener) on these ports. To use different ports, update the configuration. NGINX Gateway Fabric requires a configured [gateway](https://gateway-api.sigs.k8s.io/api-types/gateway/#gateway) resource with a valid listener to listen on any ports.{{</important>}}
50+
51+
NGINX Gateway Fabric uses the created service to update the **Addresses** field in the **Gateway Status** resource. Using a **LoadBalancer** service sets this field to the IP address and/or hostname of that service. Without a service, the pod IP address is used.
52+
53+
This gateway is associated with the NGINX Gateway Fabric through the **gatewayClassName** field. The default installation of NGINX Gateway Fabric creates a **GatewayClass** with the name **nginx**. NGINX Gateway Fabric will only configure gateways with a **gatewayClassName** of **nginx** unless you change the name via the `--gatewayclass` [command-line flag]({{< ref "/ngf/reference/cli-help.md#static-mode">}}).
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
docs: "DOCS-1439"
3+
---
4+
5+
Pull the latest stable release of the NGINX Gateway Fabric chart:
6+
7+
```shell
8+
helm pull oci://ghcr.io/nginx/charts/nginx-gateway-fabric --untar
9+
cd nginx-gateway-fabric
10+
```
11+
12+
If you want the latest version from the **main** branch, add `--version 0.0.0-edge` to your pull command.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: "Install NGINX Gateway Fabric with experimental features"
3+
docs: "DOCS-000"
4+
---
5+
6+
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.
7+
8+
{{< caution >}}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. {{</ caution >}}
9+
10+
To install the Gateway API resources from the experimental channel, run the following:
11+
12+
```shell
13+
kubectl kustomize "https://github.com/nginx/nginx-gateway-fabric/config/crd/gateway-api/experimental?ref=v1.5.1" | kubectl apply -f -
14+
```
15+
16+
{{< 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`. {{</ note >}}
17+
18+
To enable experimental features on NGINX Gateway Fabric:
19+
20+
Using Helm: Set `nginxGateway.gwAPIExperimentalFeatures.enable` to true. An example can be found
21+
in the [Installation with Helm]({{< ref "/ngf/installation/installing-ngf/helm.md#custom-installation-options" >}}) guide.
22+
23+
Using Kubernetes manifests: Add the `--gateway-api-experimental-features` command-line flag to the deployment manifest args.
24+
An example can be found in the [Installation with Kubernetes manifests]({{< ref "/ngf/installation/installing-ngf/manifests.md#3-deploy-nginx-gateway-fabric" >}}) guide.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
docs: "DOCS-1438"
3+
---
4+
5+
{{< note >}} The [Gateway API resources](https://github.com/kubernetes-sigs/gateway-api) from the standard channel must be installed before deploying NGINX Gateway Fabric. If they are already installed in your cluster, please ensure they are the correct version as supported by the NGINX Gateway Fabric - [see the Technical Specifications](https://github.com/nginx/nginx-gateway-fabric/blob/v1.5.1/README.md#technical-specifications). {{</ note >}}
6+
7+
To install the Gateway API resources, run the following:
8+
9+
```shell
10+
kubectl kustomize "https://github.com/nginx/nginx-gateway-fabric/config/crd/gateway-api/standard?ref=v1.5.1" | kubectl apply -f -
11+
```
12+
13+
{{< 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`. {{</ note >}}
14+
15+
Alternatively, you can install the Gateway API resources from the experimental channel.
16+
Installing Gateway API resources from the experimental channel includes everything in the standard release channel plus additional experimental resources and fields.
17+
NGINX Gateway Fabric currently supports a subset of the additional features provided by the experimental channel.
18+
To install from the experimental channel, run the following:
19+
20+
```shell
21+
kubectl kustomize "https://github.com/nginx/nginx-gateway-fabric/config/crd/gateway-api/experimental?ref=v1.5.1" | kubectl apply -f -
22+
```
23+
24+
{{< note >}} To learn more about what Gateway API resources NGINX Gateway Fabric currently supports, visit our [Gateway API Compatibility]({{< ref "/ngf/overview/gateway-api-compatibility.md" >}}) document. {{</ note >}}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
docs: "DOCS-000"
3+
---
4+
5+
{{< note >}} For security, follow these practices with JSON Web Tokens (JWTs), passwords, and shell history:
6+
7+
1. **JWTs:** JWTs are sensitive information. Store them securely. Delete them after use to prevent unauthorized access.
8+
9+
1. **Shell history:** Commands that include JWTs or passwords are recorded in the history of your shell, in plain text. Clear your shell history after running such commands. For example, if you use bash, you can delete commands in your `~/.bash_history` file. Alternatively, you can run the `history -c` command to erase your shell history.
10+
11+
Follow these practices to help ensure the security of your system and data. {{< /note >}}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
docs: "DOCS-000"
3+
---
4+
5+
{{< note >}} If you would rather pull the NGINX Plus image and push to a private registry, you can skip this specific step and instead follow [this step]({{< ref "/ngf/installation/nginx-plus-jwt.md#pulling-an-image-for-local-use" >}}). {{< /note >}}
6+
7+
If the `nginx-gateway` namespace does not yet exist, create it:
8+
9+
```shell
10+
kubectl create namespace nginx-gateway
11+
```
12+
13+
Create a Kubernetes `docker-registry` secret type using the contents of the JWT as the username and `none` for password (as the password is not used). The name of the docker server is `private-registry.nginx.com`.
14+
15+
```shell
16+
kubectl create secret docker-registry nginx-plus-registry-secret --docker-server=private-registry.nginx.com --docker-username=<JWT Token> --docker-password=none -n nginx-gateway
17+
```
18+
19+
It is important that the `--docker-username=<JWT Token>` contains the contents of the token and is not pointing to the token itself. When you copy the contents of the JWT, ensure there are no additional characters such as extra whitespaces. This can invalidate the token, causing 401 errors when trying to authenticate to the registry.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
docs: "DOCS-000"
3+
---
4+
5+
1. Log in to [MyF5](https://my.f5.com/manage/s/).
6+
2. Go to **My Products & Plans > Subscriptions** to see your active subscriptions.
7+
3. Find your NGINX products or services subscription, and select the **Subscription ID** for details.
8+
4. Download the **JSON Web Token (JWT)** from the subscription page.
9+
10+
{{< note >}} The Connectivity Stack for Kubernetes JWT does not work with NGINX Plus reporting. A regular NGINX Plus instance JWT must be used. {{< /note >}}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
docs: "DOCS-000"
3+
---
4+
5+
Place the JWT in a file called `license.jwt`. Create a Kubernetes Secret using the contents of the JWT file.
6+
7+
```shell
8+
kubectl create secret generic nplus-license --from-file license.jwt -n nginx-gateway
9+
```
10+
11+
You can now delete the `license.jwt` file.
12+
13+
If you need to update the JWT at any time, update the `license.jwt` field in the Secret using `kubectl edit` and apply the changes.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
docs: "DOCS-1436"
3+
---
4+
5+
{{<warning>}}This will remove all corresponding custom resources in your entire cluster, across all namespaces. Double-check to make sure you don't have any custom resources you need to keep, and confirm that there are no other Gateway API implementations active in your cluster.{{</warning>}}
6+
7+
To uninstall the Gateway API resources, run the following:
8+
9+
```shell
10+
kubectl kustomize "https://github.com/nginx/nginx-gateway-fabric/config/crd/gateway-api/standard?ref=v1.5.1" | kubectl delete -f -
11+
```
12+
13+
Alternatively, if you installed the Gateway APIs from the experimental channel, run the following:
14+
15+
```shell
16+
kubectl kustomize "https://github.com/nginx/nginx-gateway-fabric/config/crd/gateway-api/experimental?ref=v1.5.1" | kubectl delete -f -
17+
```

content/ngf/_index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: "Welcome to the NGINX Gateway Fabric documentation"
3+
url: /nginx-gateway-fabric/
4+
---

0 commit comments

Comments
 (0)