generated from nginx/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 121
feat: Set up NGF integration to N1 Console #902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 10 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
2a0030b
feat: Set up NGF integration to N1 Console
mjang 961a680
delete unneeded file
mjang 7b2ac9d
Apply suggestions from code review
mjang 01c0d91
Apply suggestions from code review
mjang b392c5e
Update helm install ngf with agent options
mjang e9807b2
Merge branch 'main' into feat-add-ngf
mjang e21ebb9
Set up new page for ngf w/manifests. Add includes
mjang 0e72d5b
fix
mjang d2e59f1
Merge branch 'main' into feat-add-ngf
mjang 154e935
Update commands for nginx-gateway namespace
mjang d077a80
Apply suggestions from code review
mjang 51fb9f1
Merge branch 'main' into feat-add-ngf
mjang 0ad8ac4
Update content/nginx-one/k8s/add-ngf-manifests.md
mjang a408a90
Add ref links
mjang 8a91b9b
Merge branch 'main' into feat-add-ngf
ADubhlaoich 8895ad8
Add common k8s secret include
mjang 75fff50
Update dp key update
mjang 1b6bcdb
Apply suggestions from code review
mjang fd55b91
Apply suggestions from code review
mjang d6ce67d
Use another include
mjang e35e6c4
Update content/nginx-one/k8s/add-ngf-manifests.md
mjang 3901ff0
Merge branch 'main' into feat-add-ngf
mjang bc4ff15
troubleshooting include
mjang 1ef87e4
More feedback
mjang fa78878
Merge branch 'main' into feat-add-ngf
mjang 4cff9ee
Apply suggestions from code review
mjang d5a66d7
Include to verify connection
mjang 82ecccc
Merge branch 'main' into feat-add-ngf
mjang cd4fdea
Move file
mjang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| nd-docs: "DOCS-000" | ||
| files: | ||
| - content/ngf/install/manifests.md | ||
| - content/nginx-one/ngf/add-ngf-manifests.md | ||
| --- | ||
|
|
||
| #### Stable release | ||
|
|
||
| ```shell | ||
| kubectl apply --server-side -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/crds.yaml | ||
| ``` | ||
|
|
||
| #### Edge version | ||
|
|
||
| ```shell | ||
| kubectl apply --server-side -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/main/deploy/crds.yaml | ||
| ``` |
125 changes: 125 additions & 0 deletions
125
content/includes/ngf/installation/deploy-ngf-manifests.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,125 @@ | ||
| --- | ||
| nd-docs: "DOCS-000" | ||
| files: | ||
| - content/ngf/install/manifests.md | ||
| - content/nginx-one/ngf/add-ngf-manifests.md | ||
| --- | ||
|
|
||
| {{< call-out "note" >}} By default, NGINX Gateway Fabric is installed in the **nginx-gateway** namespace. You can deploy in another namespace by modifying the manifest files. {{< /call-out >}} | ||
|
|
||
| {{<tabs name="install-manifests">}} | ||
|
|
||
| {{%tab name="Default"%}} | ||
|
|
||
| Deploys NGINX Gateway Fabric with NGINX OSS. | ||
|
|
||
| ```shell | ||
| kubectl apply -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/default/deploy.yaml | ||
| ``` | ||
|
|
||
| {{% /tab %}} | ||
|
|
||
| {{%tab name="AWS NLB"%}} | ||
|
|
||
| Deploys NGINX Gateway Fabric with NGINX OSS. | ||
|
|
||
| ```shell | ||
| kubectl apply -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/default/deploy.yaml | ||
| ``` | ||
|
|
||
| To set up an AWS Network Load Balancer service, add these annotations to your Gateway infrastructure field: | ||
|
|
||
| ```yaml | ||
| spec: | ||
| infrastructure: | ||
| annotations: | ||
| service.beta.kubernetes.io/aws-load-balancer-type: "external" | ||
| service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: "ip" | ||
| ``` | ||
| {{% /tab %}} | ||
| {{%tab name="Azure"%}} | ||
| Deploys NGINX Gateway Fabric with NGINX OSS and `nodeSelector` to deploy on Linux nodes. | ||
|
|
||
| ```shell | ||
| kubectl apply -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/azure/deploy.yaml | ||
| ``` | ||
|
|
||
| {{% /tab %}} | ||
|
|
||
| {{%tab name="NGINX Plus"%}} | ||
|
|
||
| Deploys NGINX Gateway Fabric with NGINX Plus. The image is pulled from the | ||
| NGINX Plus Docker registry, and the `imagePullSecretName` is the name of the Secret to use to pull the image. | ||
| The NGINX Plus JWT Secret used to run NGINX Plus is also specified in a volume mount and the `--usage-report-secret` parameter. These Secrets are created as part of the [Before you begin](#before-you-begin) section. | ||
|
|
||
| ```shell | ||
| kubectl apply -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/nginx-plus/deploy.yaml | ||
| ``` | ||
|
|
||
| {{% /tab %}} | ||
|
|
||
| {{%tab name="Experimental"%}} | ||
|
|
||
| Deploys NGINX Gateway Fabric with NGINX OSS and experimental features. | ||
|
|
||
| ```shell | ||
| kubectl apply -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/experimental/deploy.yaml | ||
| ``` | ||
|
|
||
| {{< call-out "note" >}} Requires the Gateway APIs installed from the experimental channel. {{< /call-out >}} | ||
|
|
||
| {{% /tab %}} | ||
|
|
||
| {{%tab name="NGINX Plus Experimental"%}} | ||
|
|
||
| Deploys NGINX Gateway Fabric with NGINX Plus and experimental features. The image is pulled from the | ||
| NGINX Plus Docker registry, and the `imagePullSecretName` is the name of the Secret to use to pull the image. | ||
| The NGINX Plus JWT Secret used to run NGINX Plus is also specified in a volume mount and the `--usage-report-secret` parameter. These Secrets are created as part of the [Before you begin](#before-you-begin) section. | ||
|
|
||
| ```shell | ||
| kubectl apply -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/nginx-plus-experimental/deploy.yaml | ||
| ``` | ||
|
|
||
| {{< call-out "note" >}} Requires the Gateway APIs installed from the experimental channel. {{< /call-out >}} | ||
|
|
||
| {{% /tab %}} | ||
|
|
||
| {{%tab name="NodePort"%}} | ||
|
|
||
| Deploys NGINX Gateway Fabric with NGINX OSS using a Service type of `NodePort`. | ||
|
|
||
| ```shell | ||
| kubectl apply -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/nodeport/deploy.yaml | ||
| ``` | ||
|
|
||
| {{% /tab %}} | ||
|
|
||
| {{%tab name="OpenShift"%}} | ||
|
|
||
| Deploys NGINX Gateway Fabric with NGINX OSS on OpenShift. | ||
|
|
||
| ```shell | ||
| kubectl apply -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/openshift/deploy.yaml | ||
| ``` | ||
|
|
||
| {{% /tab %}} | ||
|
|
||
| {{</tabs>}} | ||
|
|
||
| ### Verify the Deployment | ||
mjang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| To confirm that NGINX Gateway Fabric is running, check the pods in the `nginx-gateway` namespace: | ||
|
|
||
| ```shell | ||
| kubectl get pods -n nginx-gateway | ||
| ``` | ||
|
|
||
| The output should look similar to this (note that the pod name will include a unique string): | ||
|
|
||
| ```text | ||
| NAME READY STATUS RESTARTS AGE | ||
| nginx-gateway-5d4f4c7db7-xk2kq 1/1 Running 0 112s | ||
| ``` | ||
mjang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
18 changes: 18 additions & 0 deletions
18
content/includes/ngf/installation/install-manifests-prereqs.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| nd-docs: "DOCS-000" | ||
| files: | ||
| - content/ngf/install/manifests.md | ||
| - content/nginx-one/ngf/add-ngf-manifests.md | ||
| --- | ||
|
|
||
| To complete this guide, you'll need to install: | ||
|
|
||
| - [kubectl](https://kubernetes.io/docs/tasks/tools/), a command-line interface for managing Kubernetes clusters. | ||
| - [Add certificates for secure authentication]({{< ref "/ngf/install/secure-certificates.md" >}}) in a production environment. | ||
|
|
||
| {{< call-out "important" >}} If you’d like to use NGINX Plus, some additional setup is also required: {{< /call-out >}} | ||
|
|
||
| <details closed> | ||
| <summary>NGINX Plus JWT setup</summary> | ||
|
|
||
| {{< include "/ngf/installation/jwt-password-note.md" >}} | ||
mjang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,168 @@ | ||
| --- | ||
| title: Connect NGINX Gateway Fabric with Helm | ||
| toc: true | ||
| weight: 300 | ||
| nd-content-type: how-to | ||
| nd-product: NGINX One | ||
| --- | ||
|
|
||
| This document explains how to connect F5 NGINX Gateway Fabric to F5 NGINX One Console with Helm. | ||
| Connecting NGINX Gateway Fabric to NGINX One Console enables centralized monitoring of all controller instances. | ||
|
|
||
| Once connected, you'll see a **read-only** configuration of NGINX Gateway Fabric. For each instance, you can review: | ||
|
|
||
| - Read-only configuration file | ||
| - Unmanaged SSL/TLS certificates for Control Planes | ||
|
|
||
| ## Before you begin | ||
mjang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Log in to NGINX One Console. If you need more information, review our [Get started guide]({{< ref "/nginx-one/getting-started.md#before-you-begin" >}}). | ||
|
|
||
| You also need: | ||
|
|
||
| - Administrator access to a Kubernetes cluster. | ||
| - If you use [Helm](https://helm.sh) and [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl), install them locally. | ||
|
|
||
|
|
||
| ### Create a data plane key | ||
|
|
||
| {{< include "/nginx-one/how-to/generate-data-plane-key.md" >}} | ||
|
|
||
| ### Create a Kubernetes secret with the data plane key | ||
|
|
||
| To create a Kubernetes secret, you'll need: | ||
|
|
||
| - The Data Plane Key | ||
| - To set up the secret in the same namespace as NGINX Gateway Fabric | ||
| - Use the name `dataplane.key` as shown | ||
| - A namespace. The default NGINX Gateway Fabric namespace is `nginx-gateway` | ||
mjang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Once you have that information, run the following command: | ||
|
|
||
|
|
||
| ```shell | ||
| kubectl create secret generic dataplane-key \ | ||
| --from-literal=dataplane.key=<Your Dataplane Key> \ | ||
| -n <namespace> | ||
| ``` | ||
|
|
||
| ## Install Gateway API resources | ||
| <!-- Corresponds to step 2 in the UX --> | ||
| {{< include "/ngf/installation/install-gateway-api-resources.md" >}} | ||
|
|
||
| ## Install from the OCI registry | ||
| <!-- Corresponds to step 3 in the UX --> | ||
|
|
||
| The following steps install NGINX Gateway Fabric directly from the OCI helm registry. If you prefer, you can [install from sources](#install-from-sources) instead. | ||
|
|
||
| {{<tabs name="install-helm-oci">}} | ||
|
|
||
| {{%tab name="NGINX"%}} | ||
|
|
||
| To install the latest stable release of NGINX Gateway Fabric in the **nginx-gateway** namespace, run the following command: | ||
|
|
||
| ```shell | ||
| helm install ngf oci://ghcr.io/nginx/charts/nginx-gateway-fabric \ | ||
| --set nginxAgent.dataplaneKeySecretName=<data_plane_key_secret_name> \ | ||
mjang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| -n nginx-gateway | ||
| ``` | ||
|
|
||
| {{% /tab %}} | ||
|
|
||
| {{%tab name="NGINX Plus"%}} | ||
|
|
||
| {{< note >}} If applicable, replace the F5 Container registry `private-registry.nginx.com` with your internal registry for your NGINX Plus image, and replace `nginx-plus-registry-secret` with your Secret name containing the registry credentials. If your NGINX Plus JWT Secret has a different name than the default `nplus-license`, then define that name using the `nginx.usage.secretName` flag. {{< /note >}} | ||
|
|
||
| To install the latest stable release of NGINX Gateway Fabric in the **nginx-gateway** namespace, run the following command: | ||
|
|
||
| ```shell | ||
| helm install ngf oci://ghcr.io/nginx/charts/nginx-gateway-fabric \ | ||
| --set nginx.image.repository=private-registry.nginx.com/nginx-gateway-fabric/nginx-plus \ | ||
| --set nginx.plus=true \ | ||
| --set nginx.imagePullSecret=nginx-plus-registry-secret -n nginx-gateway \ | ||
| --set nginxAgent.dataplaneKeySecretName=<data_plane_key_secret_name> | ||
mjang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| {{% /tab %}} | ||
|
|
||
| {{</tabs>}} | ||
|
|
||
| `ngf` is the name of the release, and can be changed to any name you want. This name is added as a prefix to the Deployment name. | ||
|
|
||
| If you want the latest version from the **main** branch, add `--version 0.0.0-edge` to your install command. | ||
|
|
||
| To wait for the Deployment to be ready, you can either add the `--wait` flag to the `helm install` command, or run the following after installing: | ||
|
|
||
| ```shell | ||
| kubectl wait --timeout=5m -n nginx-gateway deployment/ngf-nginx-gateway-fabric --for=condition=Available | ||
mjang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ### Install from sources {#install-from-sources} | ||
| <!-- Corresponds to step 4 in the UX --> | ||
| If you prefer to install directly from sources, instead of through the OCI helm registry, use the following steps. | ||
|
|
||
| {{< include "/ngf/installation/helm/pulling-the-chart.md" >}} | ||
|
|
||
| {{<tabs name="install-helm-src">}} | ||
|
|
||
| {{%tab name="NGINX"%}} | ||
|
|
||
| To install the chart into the **nginx-gateway** namespace, run the following command: | ||
|
|
||
| ```shell | ||
| helm install ngf . --create-namespace -n nginx-gateway | ||
mjang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| {{% /tab %}} | ||
|
|
||
| {{%tab name="NGINX Plus"%}} | ||
|
|
||
| {{< note >}} If applicable, replace the F5 Container registry `private-registry.nginx.com` with your internal registry for your NGINX Plus image, and replace `nginx-plus-registry-secret` with your Secret name containing the registry credentials. If your NGINX Plus JWT Secret has a different name than the default `nplus-license`, then define that name using the `nginx.usage.secretName` flag. {{< /note >}} | ||
|
|
||
| To install the chart into the **nginx-gateway** namespace, run the following command: | ||
|
|
||
| ```shell | ||
| helm install ngf . --set nginx.image.repository=private-registry.nginx.com/nginx-gateway-fabric/nginx-plus --set nginx.plus=true --set nginx.imagePullSecret=nginx-plus-registry-secret -n nginx-gateway | ||
mjang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| {{% /tab %}} | ||
|
|
||
| {{</tabs>}} | ||
|
|
||
| `ngf` is the name of the release, and can be changed to any name you want. This name is added as a prefix to the Deployment name. | ||
|
|
||
| To wait for the Deployment to be ready, you can either add the `--wait` flag to the `helm install` command, or run the following after installing: | ||
|
|
||
| ```shell | ||
| kubectl wait --timeout=5m -n nginx-gateway deployment/ngf-nginx-gateway-fabric --for=condition=Available | ||
| ``` | ||
|
|
||
| ## Verify a connection to NGINX One Console | ||
mjang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| After deploying NGINX Gateway Fabric with NGINX Agent, you can verify the connection to NGINX One Console. | ||
| Log in to your F5 Distributed Cloud Console account. | ||
|
|
||
| - Select **NGINX One > Visit Service**. | ||
| - In the dashboard, select **Manage > Control Planes**. You should see your Control Planes listed by name, product, and version. Each control plane is associated with one or more instances. | ||
| - Select the name of the Control Plane. In the **Instances** section, select the instance of your choice. You can review instance details, including the name of the **Control Plane**. | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| If you encounter issues connecting your instances to NGINX One Console, try the following commands: | ||
|
|
||
| Check the NGINX Agent version: | ||
|
|
||
| ```shell | ||
| kubectl exec -it -n <namespace> <nginx_pod_name> -- nginx-agent -v | ||
| ``` | ||
|
|
||
| Check the NGINX Agent configuration: | ||
|
|
||
| ```shell | ||
| kubectl exec -it -n <namespace> <nginx_pod_name> -- cat /etc/nginx-agent/nginx-agent.conf | ||
| ``` | ||
|
|
||
| Check NGINX Agent logs: | ||
|
|
||
| ```shell | ||
| kubectl exec -it -n <namespace> <nginx_pod_name> -- nginx-agent | ||
| ``` | ||
mjang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.