You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ See the [Ingress User Guide](http://kubernetes.io/docs/user-guide/ingress/) to l
21
21
22
22
## What is the Ingress Controller?
23
23
24
-
The Ingress controller is an application that runs in a cluster and configures an HTTP load balancer according to Ingress resources. The load balancer can be a software load balancer running in the cluster or a hardware or cloud load balancer runnning externally. Different load balancers require different Ingress controller implementations.
24
+
The Ingress controller is an application that runs in a cluster and configures an HTTP load balancer according to Ingress resources. The load balancer can be a software load balancer running in the cluster or a hardware or cloud load balancer running externally. Different load balancers require different Ingress controller implementations.
25
25
26
26
In the case of NGINX, the Ingress controller is deployed in a pod along with the load balancer.
27
27
@@ -31,12 +31,16 @@ NGINX Ingress controller works with both NGINX and NGINX Plus and supports the s
31
31
32
32
Additionally, several NGINX and NGINX Plus features are available as extensions to the Ingress resource via annotations and the ConfigMap resource. In addition to HTTP, NGINX Ingress controller supports load balancing Websocket, gRPC, TCP and UDP applications. See [ConfigMap and Annotations doc](docs/configmap-and-annotations.md) to learn more about the supported features and customization options.
33
33
34
+
As an alternative to the Ingress, NGINX Ingress controller supports the VirtualServer and VirtualServerRoute resources. They enable use cases not supported with the Ingress resource, such as traffic splitting and advanced content-based routing. See [VirtualServer and VirtualServerRoute Resources doc](docs/virtualserver-and-virtualserverroute.md).
35
+
34
36
Read [this doc](docs/nginx-plus.md) to learn more about NGINX Ingress controller with NGINX Plus.
35
37
36
38
## Getting Started
37
39
38
40
1. Install the NGINX Ingress controller using the Kubernetes [manifests](deployments) or the [helm chart](deployments/helm-chart).
39
-
1. Run through the [Cafe example](examples/complete-example) to deploy and configure load balancing for a simple web application.
41
+
1. Configure load balancing for a simple web application:
42
+
* Use the Ingress resource. See the [Cafe example](examples/complete-example).
43
+
* Or the VirtualServer resource. See the [Basic configuration](examples-of-custom-resources/basic-configuration) example.
40
44
1. See additional configuration [examples](examples).
41
45
1. Learn more about all available configuration and customization in the [docs](docs).
Copy file name to clipboardExpand all lines: docs/custom-annotations.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# Custom Annotations
2
2
3
-
Custom annotations enable you to quickly extend the Ingress Controller to support many advanced features of NGINX, such as rate limiting, caching, etc.
3
+
Custom annotations enable you to quickly extend the Ingress resource to support many advanced features of NGINX, such as rate limiting, caching, etc.
4
4
5
5
## What are Custom Annotations
6
6
7
-
NGINX Ingress Controller supports a number of annotations that fine tune NGINX configuration (for example, connection timeouts) or enable additional features (for example, JWT validation). The complete list of annotations is available [here](configmap-and-annotations.md).
7
+
NGINX Ingress Controller supports a number of annotations for the Ingress resource that fine tune NGINX configuration (for example, connection timeouts) or enable additional features (for example, JWT validation). The complete list of annotations is available [here](configmap-and-annotations.md).
8
8
9
9
The annotations are provided only for the most common features and use cases, meaning that not every NGINX feature or a customization option is available through the annotations. Additionally, even if an annotation is available, it might not give you the satisfactory level of control of a particular NGINX feature.
Copy file name to clipboardExpand all lines: docs/nginx-ingress-controllers.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,16 +16,19 @@ The table below summarizes the key difference between nginxinc/kubernetes-ingres
16
16
| Authors | Kubernetes community | NGINX Inc and community | NGINX Inc and community |
17
17
| NGINX version |[Custom](https://github.com/kubernetes/ingress-nginx/tree/master/images/nginx) NGINX build that includes several third-party modules | NGINX official mainline [build](https://github.com/nginxinc/docker-nginx)| NGINX Plus |
18
18
| Commercial support | N/A | N/A | Included |
19
-
|**Load balancing configuration**|
20
-
| Merging Ingress rules with the same host | Supported | Supported | Supported |
19
+
|**Load balancing configuration via the Ingress resource**|
20
+
| Merging Ingress rules with the same host | Supported | Supported via [Mergeable Ingresses](../examples/mergeable-ingress-types)| Supported via [Mergeable Ingresses](../examples/mergeable-ingress-types)|
21
21
| HTTP load balancing extensions - Annotations | See the [supported annotations](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md)| See the [supported annotations](configmap-and-annotations.md)| See the [supported annotations](configmap-and-annotations.md)|
22
22
| HTTP load balancing extensions -- ConfigMap | See the [supported ConfigMap keys](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/configmap.md)| See the [supported ConfigMap keys](configmap-and-annotations.md)| See the [supported ConfigMap keys](configmap-and-annotations.md)|
23
23
| TCP/UDP | Supported via a ConfigMap | Supported via a ConfigMap with native NGINX configuration | Supported via a ConfigMap with native NGINX configuration |
24
24
| Websocket | Supported | Supported via an [annotation](../examples/websocket)| Supported via an [annotation](../examples/websocket)|
25
25
| TCP SSL Passthrough | Supported via a ConfigMap | Not supported | Not supported |
26
26
| JWT validation | Not supported | Not supported | Supported |
27
27
| Session persistence | Supported via a third-party module | Not supported | Supported |
28
+
| Canary testing (by header, cookie, weight) | Supported via annotations | Supported via custom resources | Supported via custom resources |
28
29
| Configuration templates *1 | See the [template](https://github.com/kubernetes/ingress-nginx/blob/master/rootfs/etc/nginx/template/nginx.tmpl)| See the [templates](../internal/configs/version1)| See the [templates](../internal/configs/version1)|
30
+
|**Load balancing configuration via Custom Resources**|
31
+
| HTTP load balancing | Not supported | See [VirtualServer and VirtualServerRoute](virtualserver-and-virtualserverroute.md) resources. | See [VirtualServer and VirtualServerRoute](virtualserver-and-virtualserverroute.md) resources. |
29
32
|**Deployment**|
30
33
| Command-line arguments *2 | See the [arguments](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/cli-arguments.md)| See the [arguments](cli-arguments.md)| See the [arguments](cli-arguments.md)|
31
34
| TLS certificate and key for the default server | Required as a command-line argument/ auto-generated | Required as a command-line argument | Required as a command-line argument |
| Start | The Ingress Controller fails to start. | Check the logs. | Misconfigured RBAC, a missing default server TLS Secret. |
12
12
| Ingress Resource and Annotations | The configuration is not applied. | Check the events of the Ingress resource, check the logs, check the generated config. | Invalid values of annotations. |
13
+
| VirtualServer and VirtualServerRoute Resources | The configuration is not applied. | Check the events of the VirtualServer and VirtualServerRoutes, check the logs, check the generated config. | VirtualServer and VirtualServerRoute weren't enabled during the installation. |
13
14
ConfigMap Keys | The configuration is not applied. | Check the events of the ConfigMap, check the logs, check the generated config. | Invalid values of ConfigMap keys. |
14
15
| NGINX | NGINX responds with unexpected responses. | Check the logs, check the generated config, check the live activity dashboard (NGINX Plus only), run NGINX in the debug mode. | Unhealthy backend pods, a misconfigured backend service. |
15
16
@@ -46,6 +47,29 @@ Events:
46
47
```
47
48
Note how in the events section we have a Normal event with the AddedOrUpdated reason informing us that the configuration was successfully applied.
48
49
50
+
### Checking the Events of a VirtualServer and VirtualServerRoute Resources
51
+
52
+
After you create or update a VirtualServer resource, you can immediately check if the NGINX configuration for that resource was successfully applied by NGINX:
53
+
```
54
+
$ kubectl describe vs cafe
55
+
. . .
56
+
Events:
57
+
Type Reason Age From Message
58
+
---- ------ ---- ---- -------
59
+
Normal AddedOrUpdated 16s nginx-ingress-controller Configuration for default/cafe was added or updated
60
+
```
61
+
Note how in the events section we have a Normal event with the AddedOrUpdated reason informing us that the configuration was successfully applied.
62
+
63
+
Checking the events of a VirtualServerRoute is similar:
64
+
```
65
+
$ kubectl describe vsr coffee
66
+
. . .
67
+
Events:
68
+
Type Reason Age From Message
69
+
---- ------ ---- ---- -------
70
+
Normal AddedOrUpdated 1m nginx-ingress-controller Configuration for default/coffee was added or updated
71
+
```
72
+
49
73
### Checking the Events of the ConfigMap Resource
50
74
51
75
After you update the [ConfigMap](configmap-and-annotations.md) resource, you can immediately check if the configuration was successfully applied by NGINX:
@@ -64,7 +88,7 @@ Note how in the events section we have a Normal event with the Updated reason in
64
88
65
89
### Checking the Generated Config
66
90
67
-
For each Ingress resource, the Ingress Controller generates a corresponding NGINX configuration file in the `/etc/nginx/conf.d` folder. Additionally, the Ingress Controller generates the main configuration file `/etc/nginx/nginx.conf`, which includes all the configurations files from `/etc/nginx/conf.d`.
91
+
For each Ingress/VirtualServer resource, the Ingress Controller generates a corresponding NGINX configuration file in the `/etc/nginx/conf.d` folder. Additionally, the Ingress Controller generates the main configuration file `/etc/nginx/nginx.conf`, which includes all the configurations files from `/etc/nginx/conf.d`. The config of a VirtualServerRoute resource is located in the configuration file of the VirtualServer that references the resource.
68
92
69
93
You can view the content of the main configuration file by running:
Copy file name to clipboardExpand all lines: examples/custom-annotations/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Custom Annotations
2
2
3
-
Custom annotations enable you to quickly extend the Ingress Controller to support many advanced features of NGINX, such as rate limiting, caching, etc.
3
+
Custom annotations enable you to quickly extend the Ingress resource to support many advanced features of NGINX, such as rate limiting, caching, etc.
4
4
5
5
Let's create a set of custom annotations to support [rate-limiting](https://nginx.org/en/docs/http/ngx_http_limit_req_module.html):
0 commit comments