Skip to content

Commit 90f5e08

Browse files
ADubhlaoichmjangJTorreG
authored
feat: Migrate NGINX Ingress Controller documentation into repository (#688)
* feat: Add NIC content * feat: Move NIC files into appropriate folders * feat: Fix remaining references and configuration * feat: Add NIC to CODEOWNERS * Update .github/CODEOWNERS * Update .github/CODEOWNERS * feat: Codeowners formatting change * Update content/nic/installation/integrations/app-protect-waf-v5/compile-waf-policies.md --------- Co-authored-by: Mike Jang <[email protected]> Co-authored-by: Jon Torre <[email protected]>
1 parent 8a256ba commit 90f5e08

File tree

140 files changed

+22101
-2
lines changed

Some content is hidden

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

140 files changed

+22101
-2
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ content/includes/nginxaas-azure/* @nginx/n4a-docs-approvers
3737
content/ngf/* @nginx/nginx-gateway-fabric
3838
content/includes/ngf/* @nginx/nginx-gateway-fabric
3939

40+
# NGINX Ingress Controller
41+
content/nic/* @nginx/kic
42+
content/includes/nic/* @nginx/kic
43+
4044
# NGINX Instance Manager
4145
content/nms/nim/* @nginx/nim-docs-approvers
4246
content/nim/* @nginx/nim-docs-approvers

config/_default/config.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,19 @@ pygmentsUseClasses = true
77
enableGitInfo = true
88

99
[permalinks]
10+
agent = '/nginx-agent/:sections[1:]/:filename'
1011
amplify = '/nginx-amplify/:sections[1:]/:filename'
1112
controller = '/nginx-controller/:sections[1:]/:filename'
1213
mesh = '/nginx-service-mesh/:sections[1:]/:filename'
1314
modsec-waf = '/nginx-waf/:sections[1:]/:filename'
1415
nap-dos = '/nginx-app-protect-dos/:sections[1:]/:filename'
1516
nap-waf = '/nginx-app-protect-waf/:sections[1:]/:filename'
17+
nginxaas = '/nginxaas/azure/:sections[1:]/:filename'
1618
ngf = '/nginx-gateway-fabric/:sections[1:]/:filename'
19+
nic = '/nginx-ingress-controller/:sections[1:]/:filename'
1720
nim = '/nginx-instance-manager/:sections[1:]/:filename'
1821
nms = '/nginx-management-suite/:sections[1:]/:filename'
1922
unit = '/nginx-unit/:sections[1:]/:filename'
20-
agent = '/nginx-agent/:sections[1:]/:filename'
21-
nginxaas = '/nginxaas/azure/:sections[1:]/:filename'
2223

2324
[caches]
2425
[caches.modules]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
The following table shows compatibility between NGINX Ingress Controller (NIC) and NGINX App Protect WAF (NAP-WAF) versions:
2+
3+
{{< bootstrap-table "table table-striped table-responsive" >}}
4+
| NIC Version | NAP-WAF Version | Config Manager | Enforcer |
5+
| ------------------- | --------------- | -------------- | -------- |
6+
| {{< nic-version >}} | 34+5.332 | 5.6.0 | 5.6.0 |
7+
| 4.0.1 | 33+5.264 | 5.5.0 | 5.5.0 |
8+
| 3.7.2 | 32+5.1 | 5.3.0 | 5.3.0 |
9+
| 3.6.2 | 32+5.48 | 5.2.0 | 5.2.0 |
10+
{{% /bootstrap-table %}}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Configuration
3+
description:
4+
weight: 1400
5+
menu:
6+
docs:
7+
parent: NGINX Ingress Controller
8+
---
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
title: Deploy a Policy for access control
3+
weight: 900
4+
toc: true
5+
docs: DOCS-000
6+
---
7+
8+
This topic describes how to use F5 NGINX Ingress Controller to apply and update a Policy for access control. It demonstrates it using an example application and a [VirtualServer custom resource]({{< ref "/configuration/virtualserver-and-virtualserverroute-resources.md" >}}).
9+
10+
---
11+
12+
## Before you begin
13+
14+
You should have a [working NGINX Ingress Controller]({{< ref "/installation/installing-nic/installation-with-helm.md" >}}) instance.
15+
16+
For ease of use in shell commands, set two shell variables:
17+
18+
1. The public IP address for your NGINX Ingress Controller instance.
19+
20+
```shell
21+
IC_IP=<ip-address>
22+
```
23+
24+
2. The HTTP port of the same instance.
25+
26+
```shell
27+
IC_HTTP_PORT=<port number>
28+
```
29+
30+
---
31+
32+
## Deploy the example application
33+
34+
Create the file _webapp.yaml_ with the following contents:
35+
36+
{{< ghcode "https://raw.githubusercontent.com/nginx/kubernetes-ingress/refs/heads/main/examples/custom-resources/access-control/webapp.yaml" >}}
37+
38+
Apply it using `kubectl`:
39+
40+
```shell
41+
kubectl apply -f webapp.yaml
42+
```
43+
44+
---
45+
46+
## Deploy a Policy to create a deny rule
47+
48+
Create a file named _access-control-policy-deny.yaml_. The highlighted _deny_ field will be used by the example application, and should be changed to the subnet of your machine.
49+
50+
{{< ghcode "https://raw.githubusercontent.com/nginx/kubernetes-ingress/refs/heads/main/examples/custom-resources/access-control/access-control-policy-deny.yaml" "hl_lines=7-8" >}}
51+
52+
Apply the policy:
53+
54+
```shell
55+
kubectl apply -f access-control-policy-deny.yaml
56+
```
57+
58+
---
59+
60+
## Configure load balancing
61+
62+
Create a file named _virtual-server.yaml_ for the VirtualServer resource. The _policies_ field references the access control Policy created in the previous section.
63+
64+
{{< ghcode "https://raw.githubusercontent.com/nginx/kubernetes-ingress/refs/heads/main/examples/custom-resources/access-control/virtual-server.yaml" "hl_lines=7-8" >}}
65+
66+
Apply the policy:
67+
68+
```shell
69+
kubectl apply -f virtual-server.yaml
70+
```
71+
72+
---
73+
74+
## Test the example application
75+
76+
Use `curl` to attempt to access the application:
77+
78+
```shell
79+
curl --resolve webapp.example.com:$IC_HTTP_PORT:$IC_IP http://webapp.example.com:$IC_HTTP_PORT
80+
```
81+
```text
82+
<html>
83+
<head><title>403 Forbidden</title></head>
84+
<body>
85+
<center><h1>403 Forbidden</h1></center>
86+
</body>
87+
</html>
88+
```
89+
90+
The *403* response is expected, successfully blocking your machine.
91+
92+
---
93+
94+
## Update the Policy to create an allow rule
95+
96+
Update the Policy with the file _access-control-policy-allow.yaml_, setting the _allow_ field to the subnet of your machine.
97+
98+
{{< ghcode "https://raw.githubusercontent.com/nginx/kubernetes-ingress/refs/heads/main/examples/custom-resources/access-control/access-control-policy-allow.yaml" "hl_lines=7-8" >}}
99+
100+
Apply the Policy:
101+
102+
```shell
103+
kubectl apply -f access-control-policy-allow.yaml
104+
```
105+
106+
----
107+
108+
## Verify the Policy update
109+
110+
Attempt to access the application again:
111+
112+
```shell
113+
curl --resolve webapp.example.com:$IC_HTTP_PORT:$IC_IP http://webapp.example.com:$IC_HTTP_PORT
114+
```
115+
```text
116+
Server address: 10.64.0.13:8080
117+
Server name: webapp-5cbbc7bd78-wf85w
118+
```
119+
120+
The successful response demonstrates that the policy has been updated.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
docs: DOCS-584
3+
doctypes:
4+
- ''
5+
title: Configuration examples
6+
toc: true
7+
weight: 400
8+
---
9+
10+
Our [GitHub repo](https://github.com/nginx/kubernetes-ingress) includes a number of configuration examples:
11+
12+
- [*Examples of Custom Resources*](https://github.com/nginx/kubernetes-ingress/tree/v{{< nic-version >}}/examples/custom-resources) show how to advanced NGINX features by using VirtualServer, VirtualServerRoute, TransportServer and Policy Custom Resources.
13+
- [*Examples of Ingress Resources*](https://github.com/nginx/kubernetes-ingress/tree/v{{< nic-version >}}/examples/ingress-resources) show how to use advanced NGINX features in Ingress resources with annotations.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Global configuration
3+
description:
4+
weight: 100
5+
menu:
6+
docs:
7+
parent: NGINX Ingress Controller
8+
---

0 commit comments

Comments
 (0)