-
Notifications
You must be signed in to change notification settings - Fork 102
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
nd-docs: "DOCS-0000" | ||
files: | ||
- content/nginx-one/k8s/add-ngf.md | ||
- content/ngf/install/helm.md | ||
--- | ||
|
||
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 --create-namespace -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 | ||
``` | ||
|
||
{{% /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 |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,144 @@ | ||||||
--- | ||||||
title: Connect NGINX Gateway Fabric | ||||||
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 using NGINX Agent. | ||||||
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 | ||||||
|
||||||
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. | ||||||
- [Helm](https://helm.sh) and [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) must be installed locally. | ||||||
|
||||||
|
||||||
### Create a data plane key | ||||||
|
||||||
Data plane keys are displayed only once, when you create that key, and cannot be retrieved later. | ||||||
|
||||||
If you've created and recorded one or more data plane keys, you can edit or revoke those keys. To do so, select **Manage > Data Plane Keys**. NGINX One Console does not store your actual data plane key. | ||||||
|
||||||
If you've forgotten your data plane key, you can create a new one. Select **Manage > Data Plane Keys > Add Data Plane Key**. | ||||||
|
||||||
For more options associated with data plane keys, see [Create and manage data plane keys]({{ ref "/nginx-one/connect-instances/create-manage-data-plane-keys" >}}). | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
### Create a Kubernetes secret with the data plane key | ||||||
<!-- Maybe this is wrong. I'm assuming that we need to follow this step from the current version of https://docs.nginx.com/nginx-one/k8s/add-nic/#before-you-begin --> | ||||||
To create a Kubernetes secret with the data play key, use the following command: | ||||||
|
||||||
```shell | ||||||
kubectl create secret generic dataplane-key \ | ||||||
--from-literal=dataplane.key=<Your Dataplane Key> \ | ||||||
-n <namespace> | ||||||
``` | ||||||
|
||||||
Comment on lines
+37
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This step is good, can we just specify somewhere in a note that the secret needs to be created in the same namespace as NGF. And that the secret's key has to be named There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll note that the default NGF namespace is |
||||||
### Install cert-manager | ||||||
|
||||||
Add the Helm repository: | ||||||
|
||||||
```shell | ||||||
helm repo add jetstack https://charts.jetstack.io | ||||||
helm repo update | ||||||
``` | ||||||
|
||||||
Install cert-manager: | ||||||
|
||||||
```shell | ||||||
helm install \ | ||||||
cert-manager jetstack/cert-manager \ | ||||||
--namespace cert-manager \ | ||||||
--create-namespace \ | ||||||
--set config.apiVersion="controller.config.cert-manager.io/v1alpha1" \ | ||||||
--set config.kind="ControllerConfiguration" \ | ||||||
--set config.enableGatewayAPI=true \ | ||||||
--set crds.enabled=true | ||||||
``` | ||||||
|
||||||
This also enables Gateway API features for cert-manager, which can be useful for [securing your workload traffic]({{< ref "/ngf/traffic-security/integrate-cert-manager.md" >}}). | ||||||
Comment on lines
+47
to
+69
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Am I right in thinking that this portion isn't necessary? @sjberman There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not necessary for anything related to N1C, that's correct. |
||||||
|
||||||
## Install the 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 --> | ||||||
{{< include "/ngf/installation/install-oci-registry.md" >}} | ||||||
|
||||||
### Install from sources {#install-from-sources} | ||||||
Comment on lines
+75
to
+79
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'll need to include setting the flag specifying the secret name when installing through Helm for all the commands,
Like they do in NIC. We can also specify through manifests they need to add the |
||||||
<!-- 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 | ||||||
``` | ||||||
|
||||||
{{% /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 | ||||||
``` | ||||||
|
||||||
{{% /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 | ||||||
|
||||||
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, go to **Manage > Instances**. You should see your instances listed by name. The instance name matches both the hostname and the pod name. | ||||||
Comment on lines
+121
to
+122
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will need to be revised a little. After deploying NGF, it will show up as a control plane in Manage > Control Planes. After a user deploys a Gateway/NGINX Resource, it will show up in the Manage > Instances. Not sure how you'd want to word that, or if you need more input from my end. |
||||||
|
||||||
## 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 | ||||||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This gets rendered like this, is that intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope: that's missing a left bracket. I'll add an edit suggestion to save Mike some time.