generated from nginx/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 96
feature: incorporate NIC into NGINX 1 Console (not yet for NGF) #736
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
Open
mjang
wants to merge
19
commits into
main
Choose a base branch
from
nic-ngf-nginx-one-integration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
3becc88
feature: incorporate NIC and NGF into NGINX 1 Console
mjang 8248f49
update
mjang 268f046
update
mjang 1a65be9
More
mjang bfce117
More
mjang 38f6157
change directory
mjang d359005
fix broken link
mjang a586dba
Change ordering
mjang 9cd9002
Apply suggestions from code review
mjang 7f2aff0
Include changelog
mjang 1161599
Fix index XML issue
mjang 69eeca6
Apply suggestions from code review
mjang c0b4d66
Merge branch 'main' into nic-ngf-nginx-one-integration
mjang 3e5671c
Apply suggestions from code review
mjang 334fb42
Apply suggestions from code review
mjang 8c2c658
Apply suggestions from code review
mjang 351a25e
Apply suggestions from code review
mjang 71650ed
Merge branch 'main' into nic-ngf-nginx-one-integration
ADubhlaoich 19f7def
Apply suggestions from code review
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: Automate with the NGINX One API | ||
description: | ||
weight: 700 | ||
weight: 800 | ||
url: /nginx-one/api | ||
--- |
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,8 @@ | ||
--- | ||
title: Connect Kubernetes deployments | ||
description: | ||
weight: 700 | ||
url: /nginx-one/k8s | ||
nd-product: NGINX One | ||
--- | ||
|
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,159 @@ | ||
--- | ||
title: Connect to NGINX One Console | ||
toc: true | ||
weight: 200 | ||
nd-content-type: how-to | ||
nd-product: NGINX One | ||
--- | ||
|
||
This document explains how to connect F5 NGINX Ingress Controller <!-- and F5 NGINX Gateway Fabric -->to F5 NGINX One Console using NGINX Agent. | ||
Connecting NGINX Ingress Controller to NGINX One Console enables centralized monitoring of all controller instances. | ||
|
||
Once connected, you'll see a **read-only** configuration of NGINX Ingress Controller. For each instance, you can review: | ||
|
||
- Read-only configuration file | ||
- Unmanaged SSL/TLS certificates for Control Planes | ||
|
||
## Before you begin | ||
|
||
Before connecting NGINX Ingress Controller to NGINX One Console, you need to create a Kubernetes Secret with the data plane key. Use the following command: | ||
|
||
```shell | ||
kubectl create secret generic dataplane-key \ | ||
--from-literal=dataplane.key=<Your Dataplane Key> \ | ||
-n <namespace> | ||
``` | ||
|
||
When you create a Kubernetes Secret, use the same namespace where NGINX Ingress Controller is running. | ||
If you use [`-watch-namespace`]({{< ref "/nic/configuration/global-configuration/command-line-arguments.md#watch-namespace-string" >}}) or [`watch-secret-namespace`]({{< ref "/nic/configuration/global-configuration/command-line-arguments.md#watch-secret-namespace-string" >}}) arguments with NGINX Ingress Controller, | ||
you need to add the dataplane key secret to the watched namespaces. This secret will take approximately 60 - 90 seconds to reload on the pod. | ||
|
||
{{<note>}} | ||
You can also create a data plane key through the NGINX One Console. Once loggged in, select **Manage > Control Planes > Add Control Plane**, and follow the steps shown. | ||
{{</note>}} | ||
|
||
## Deploy NGINX Ingress Controller with NGINX Agent | ||
|
||
{{<tabs name="deploy-config-resource">}} | ||
{{%tab name="Helm"%}} | ||
|
||
Edit your `values.yaml` file to enable NGINX Agent and configure it to connect to NGINX One Console: | ||
|
||
```yaml | ||
nginxAgent: | ||
enable: true | ||
dataplaneKeySecretName: "<data_plane_key_secret_name>" | ||
``` | ||
|
||
The `dataplaneKeySecretName` is used to authenticate the agent with NGINX One Console. See the [NGINX One Console Docs]({{< ref "/nginx-one/connect-instances/create-manage-data-plane-keys.md" >}}) | ||
for instructions on how to generate your dataplane key from the NGINX One Console. | ||
|
||
Follow the [Installation with Helm]({{< ref "/nic/installation/installing-nic/installation-with-helm.md" >}}) instructions to deploy NGINX Ingress Controller. | ||
|
||
{{%/tab%}} | ||
{{%tab name="Manifests"%}} | ||
|
||
Add the following flag to the Deployment/DaemonSet file of NGINX Ingress Controller: | ||
|
||
```yaml | ||
args: | ||
- -agent=true | ||
``` | ||
|
||
Create a `ConfigMap` with an `nginx-agent.conf` file: | ||
|
||
```yaml | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: nginx-agent-config | ||
namespace: <namespace> | ||
data: | ||
nginx-agent.conf: |- | ||
log: | ||
# set log level (error, info, debug; default "info") | ||
level: info | ||
# set log path. if empty, don't log to file. | ||
path: "" | ||
|
||
allowed_directories: | ||
- /etc/nginx | ||
- /usr/lib/nginx/modules | ||
|
||
features: | ||
- certificates | ||
- connection | ||
- metrics | ||
- file-watcher | ||
|
||
## command server settings | ||
command: | ||
server: | ||
host: product.connect.nginx.com | ||
port: 443 | ||
auth: | ||
tokenpath: "/etc/nginx-agent/secrets/dataplane.key" | ||
tls: | ||
skip_verify: false | ||
``` | ||
|
||
Make sure to set the namespace in the nginx-agent.config to the same namespace as NGINX Ingress Controller. | ||
Mount the ConfigMap to the Deployment/DaemonSet file of NGINX Ingress Controller: | ||
|
||
```yaml | ||
volumeMounts: | ||
- name: nginx-agent-config | ||
mountPath: /etc/nginx-agent/nginx-agent.conf | ||
subPath: nginx-agent.conf | ||
- name: dataplane-key | ||
mountPath: /etc/nginx-agent/secrets | ||
volumes: | ||
- name: nginx-agent-config | ||
configMap: | ||
name: nginx-agent-config | ||
- name: dataplane-key | ||
secret: | ||
secretName: "<data_plane_key_secret_name>" | ||
``` | ||
|
||
Follow the [Installation with Manifests]({{< ref "/nic/installation/installing-nic/installation-with-manifests.md" >}}) instructions to deploy NGINX Ingress Controller. | ||
|
||
{{%/tab%}} | ||
{{</tabs>}} | ||
|
||
## Verify a connection to NGINX One Console | ||
|
||
After deploying NGINX Ingress Controller <!-- or NGINX Gateway Fabric --> with NGINX Agent, you can verify the connection to NGINX One Console. | ||
mjang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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. | ||
|
||
## 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_ingress_pod_name> -- nginx-agent -v | ||
``` | ||
|
||
If nginx-agent version is v3, continue with the following steps. | ||
Otherwise, make sure you are using an image that does not include NGINX App Protect. | ||
|
||
Check the NGINX Agent configuration: | ||
|
||
```shell | ||
kubectl exec -it -n <namespace> <nginx_ingress_pod_name> -- cat /etc/nginx-agent/nginx-agent.conf | ||
``` | ||
|
||
Check NGINX Agent logs: | ||
|
||
```shell | ||
kubectl exec -it -n <namespace> <nginx_ingress_pod_name> -- nginx-agent | ||
``` | ||
|
||
Select the instance associated with your deployment of NGINX Ingress Controller. Under the **Details** tab, you'll see information associated with: | ||
|
||
- Unmanaged SSL/TLS certificates for Control Planes | ||
- Configuration recommendations | ||
|
||
Under the **Configuration** tab, you'll see a **read-only** view of the configuration files. |
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,19 @@ | ||
--- | ||
mjang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# We use sentence case and present imperative tone | ||
title: "Integrate Kubernetes control planes" | ||
# Weights are assigned in increments of 100: determines sorting order | ||
weight: 100 | ||
# Creates a table of contents and sidebar, useful for large documents | ||
toc: false | ||
# Types have a 1:1 relationship with Hugo archetypes, so you shouldn't need to change this | ||
nd-content-type: concept | ||
# Intended for internal catalogue and search, case sensitive: | ||
# Agent, N4Azure, NIC, NIM, NGF, NAP-DOS, NAP-WAF, NGINX One, NGINX+, Solutions, Unit | ||
nd-product: NGINX One | ||
--- | ||
|
||
You can now include Kubernetes systems through the [control plane](https://www.f5.com/glossary/control-plane). In related documentation, you can learn how to: | ||
|
||
- Set up a connection to F5 NGINX One Console through a data plane key. | ||
- Review the NGINX Ingress Controller instances that are part of your fleet. | ||
|
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.