Skip to content

Commit 73c6744

Browse files
authored
Docs for connecting NIC to NGINX One Console (#7815)
1 parent 7d031ad commit 73c6744

File tree

1 file changed

+130
-0
lines changed

1 file changed

+130
-0
lines changed
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
---
2+
title: Connect NGINX Ingress Controller to NGINX One Console
3+
toc: true
4+
draft: true
5+
weight: 1800
6+
nd-type: how-to
7+
nd-product: NIC
8+
---
9+
10+
This document explains how to connect F5 NGINX Ingress Controller to NGINX One Console using NGINX Agent.
11+
12+
Connecting NGINX Ingress Controller to NGINX One Console enables centralized monitoring of all controller instances.
13+
14+
## Deploy NGINX Ingress Controller with NGINX Agent
15+
16+
{{<tabs name="deploy-config-resource">}}
17+
18+
{{%tab name="Helm"%}}
19+
20+
Edit your `values.yaml` file to enable NGINX Agent and configure it to connect to NGINX One Console:
21+
```yaml
22+
nginxAgent:
23+
enable: true
24+
dataplaneKey: "<Your Dataplane Key>"
25+
```
26+
27+
The `dataplaneKey` is used to authenticate the agent with NGINX One Console. See the NGINX One Console Docs [here](https://docs.nginx.com/nginx-one/getting-started/#generate-data-plane-key) to generate your dataplane key from the NGINX One Console.
28+
29+
30+
Follow the [Installation with Helm]({{< ref "/installation/installing-nic/installation-with-helm.md" >}}) instructions to deploy NGINX Ingress Controller.
31+
32+
{{%/tab%}}
33+
34+
{{%tab name="Manifests"%}}
35+
36+
Add the following flag to the deployment/daemonset file of NGINX Ingress Controller:
37+
38+
```yaml
39+
args:
40+
- -agent=true
41+
```
42+
43+
Create a ConfigMap with an `nginx-agent.conf` file:
44+
45+
```yaml
46+
kind: ConfigMap
47+
apiVersion: v1
48+
metadata:
49+
name: nginx-agent-config
50+
namespace: <namespace>
51+
data:
52+
nginx-agent.conf: |-
53+
log:
54+
# set log level (error, info, debug; default "info")
55+
level: info
56+
# set log path. if empty, don't log to file.
57+
path: ""
58+
59+
allowed_directories:
60+
- /etc/nginx
61+
- /usr/lib/nginx/modules
62+
63+
features:
64+
- certificates
65+
- connection
66+
- metrics
67+
- file-watcher
68+
69+
## command server settings
70+
command:
71+
server:
72+
host: product.connect.nginx.com
73+
port: 443
74+
auth:
75+
token: "<Your Dataplane Key>"
76+
tls:
77+
skip_verify: false
78+
```
79+
80+
Make sure you set the namespace in the nginx-agent-config to the same namespace as NGINX Ingress Controller.
81+
82+
Mount the ConfigMap to the deployment/daemonset file of NGINX Ingress Controller:
83+
84+
```yaml
85+
volumeMounts:
86+
- name: nginx-agent-config
87+
mountPath: /etc/nginx-agent/nginx-agent.conf
88+
subPath: nginx-agent.conf
89+
volumes:
90+
- name: nginx-agent-config
91+
configMap:
92+
name: nginx-agent-config
93+
```
94+
95+
Follow the [Installation with Manifests]({{< ref "/installation/installing-nic/installation-with-manifests.md" >}}) instructions to deploy NGINX Ingress Controller.
96+
97+
{{%/tab%}}
98+
99+
{{</tabs>}}
100+
101+
## Verify that NGINX Ingress Controller is connected to NGINX One
102+
103+
After deploying NGINX Ingress Controller with NGINX Agent, you can verify the connection to NGINX One Console.
104+
105+
Log in to your NGINX One Console account and navigate to the Instances dashboard. Your NGINX Ingress Controller instances should appear in the list, where the instance name will be the pod name.
106+
107+
## Troubleshooting
108+
109+
If you encounter issues connecting NGINX Ingress Controller to NGINX One Console, try the following steps based on your image type:
110+
111+
Check the NGINX Agent version:
112+
113+
```shell
114+
kubectl exec -it -n <namespace> <nginx-ingress-pod-name> -- nginx-agent -v
115+
```
116+
117+
If nginx-agent version is v3, continue with the following steps.
118+
Otherwise, make sure you are using an image that does not include App Protect.
119+
120+
Check the NGINX Agent configuration:
121+
122+
```shell
123+
kubectl exec -it -n <namespace> <nginx-ingress-pod-name> -- cat /etc/nginx-agent/nginx-agent.conf
124+
```
125+
126+
Check NGINX Agent logs:
127+
128+
```shell
129+
kubectl exec -it -n <namespace> <nginx-ingress-pod-name> -- nginx-agent
130+
```

0 commit comments

Comments
 (0)