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
+8-14Lines changed: 8 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,20 +30,23 @@ We provide the following extensions to our Ingress controller:
30
30
*[SSL Services](examples/ssl-services), which allows you to load balance HTTPS applications.
31
31
*[Rewrites](examples/rewrites), which allows you to rewrite the URI of a request before sending it to the application.
32
32
*[Session Persistence](examples/session-persistence) (NGINX Plus only), which guarantees that all the requests from the same client are always passed to the same backend container.
33
+
*[Support for JWTs](examples/jwt) (NGINX Plus only), which allows NGINX Plus to authenticate requests by validating JSON Web Tokens (JWTs).
33
34
34
-
Additionally, we provide a mechanism to customize the NGINX configuration. Refer to the[examples folder](examples) to find out how to [deploy](examples/complete-example) the Ingress controller and [customize](examples/customization) the NGINX configuration.
35
+
Additional extensions as well as a mechanism to customize NGINX configuration are available. See[examples/customization](examples/customization).
35
36
36
37
## Benefits of Using the Ingress Controller with NGINX Plus
37
38
38
39
[NGINX Plus](https://www.nginx.com/products/) is a commercial version of NGINX that comes with advanced features and support.
39
40
40
41
The Ingress controller leverages the advanced features of NGINX Plus, which gives you the following additional benefits:
41
42
42
-
***Reduced number of configuration reloads**
43
-
Every time the number of pods of services you expose via Ingress changes, the Ingress controller updates the configuration of NGINX to reflect those changes. For the open source NGINX software, the configuration file must be changed and the configuration reloaded. For NGINX Plus, the [on-the-fly reconfiguration](https://www.nginx.com/products/on-the-fly-reconfiguration/) feature is utilized, which allows NGINX Plus to be updated on-the-fly without reloading the configuration. This prevents a potential increase of memory usage and overall system overloading, which could occur with too frequent configuration reloads.
43
+
***Improved system resources utilization for large-scale deployments**
44
+
Every time the number of pods of services you expose via Ingress changes, the Ingress controller updates the configuration of NGINX to reflect those changes. For the open source NGINX software, the configuration file must be changed and the configuration reloaded. For NGINX Plus, the [on-the-fly reconfiguration](https://www.nginx.com/products/on-the-fly-reconfiguration/) feature is utilized, which allows NGINX Plus to be updated on-the-fly without reloading the configuration. This prevents increase of memory usage during reloads, especially with a high volume of client requests, as well as increased memory usage when load balancing applications with long-lived connections (WebSocket, applications with file uploading/downloading or streaming). As a result, NGINX Plus Ingress controller is better suited for production-ready deployments.
44
45
***Real-time statistics**
45
46
NGINX Plus provides you with [advanced statistics](https://www.nginx.com/products/live-activity-monitoring/), which you can access either through the API or via the built-in dashboard. This can give you insights into how NGINX Plus and your applications are performing.
46
47
***Session persistence** When enabled, NGINX Plus makes sure that all the requests from the same client are always passed to the same backend container using the *sticky cookie* method. Refer to the [session persistence examples](examples/session-persistence) to find out how to configure it.
48
+
***JWTs** NGINX Plus can validate JSON Web Tokens (JWTs), providing a flexible authentication mechanism.
49
+
***Support** Support from NGINX Inc is available for NGINX Plus Ingress controller.
47
50
48
51
**Note**: Deployment of the Ingress controller for NGINX Plus requires you to do one extra step: build your own [Docker image](nginx-controller) using the certificate and key for your subscription.
49
52
The Docker image of the Ingress controller for NGINX is [available on Docker Hub](https://hub.docker.com/r/nginxdemos/nginx-ingress/).
@@ -52,21 +55,12 @@ The Docker image of the Ingress controller for NGINX is [available on Docker Hub
52
55
53
56
You can run multiple Ingress controllers at the same time. For example, if your Kubernetes cluster is deployed in cloud, you can run the NGINX controller and the corresponding cloud HTTP load balancing controller. Refer to the [example](examples/multiple-ingress-controllers) to learn more.
54
57
55
-
## Advanced Load Balancing (Beyond Ingress)
58
+
## Advanced Load Balancing/An Alternative Method of Configuration
56
59
57
-
When your requirements go beyond what Ingress offers, you can use NGINX and
58
-
NGINX Plus without the Ingress Controller.
60
+
When your requirements go beyond what Ingress and Ingress extensions offer or if you are looking for an alternative method of configuring NGINX, it is possible to use NGINX or NGINX Plus without the Ingress Controller.
59
61
60
62
NGINX Plus comes with a [DNS-based dynamic reconfiguration feature](https://www.nginx.com/blog/dns-service-discovery-nginx-plus/), which lets you keep the list of the endpoints of your services in sync with NGINX Plus. Read more about how to setup NGINX Plus this way in [Load Balancing Kubernetes Services with NGINX Plus](https://www.nginx.com/blog/load-balancing-kubernetes-services-nginx-plus/).
61
63
62
-
## Production Status
63
-
64
-
This is the preview version of the Ingress controller.
65
-
66
-
## Support
67
-
68
-
Support from the [NGINX Professional Services Team](https://www.nginx.com/services/) is available when using the NGINX Plus Ingress controller.
69
-
70
64
## Contacts
71
65
72
66
We’d like to hear your feedback! If you have any suggestions or experience issues with our Ingress controller, please create an issue or send a pull request on Github.
Copy file name to clipboardExpand all lines: examples/customization/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,8 @@ The table below summarizes some of the options. More options (extensions) are av
35
35
|`nginx.org/location-snippets`|`location-snippets`| Sets a custom snippet in location context. | N/A |
36
36
|`nginx.org/server-snippets`|`server-snippets`| Sets a custom snippet in server context. | N/A |
37
37
|`nginx.org/lb-method`|`lb-method`| Sets the [load balancing method](https://www.nginx.com/resources/admin-guide/load-balancer/#method). The default `""` specifies the round-robin method. |`""`|
38
+
|`nginx.org/listen-ports`| N/A | Configures HTTP ports that NGINX will listen on. |`[80]`|
39
+
|`nginx.org/listen-ports-ssl`| N/A | Configures HTTPS ports that NGINX will listen on. |`[443]`|
Copy file name to clipboardExpand all lines: examples/daemon-set/README.md
+17-13Lines changed: 17 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,25 +2,29 @@
2
2
3
3
You can deploy the NGINX or NGINX Plus controller as a [Daemon Set](http://kubernetes.io/docs/admin/daemons/). This allows you to deploy the controller on all or select nodes of your cluster.
4
4
5
-
To deploy the NGINX controller, run:
6
-
```
7
-
$ kubectl create -f nginx-ingress.yaml
8
-
```
5
+
1. Create a Secret with an SSL certificate and key for the default server of NGINX/NGINX Plus. It is recommended that you use your own certificate and key.
6
+
```
7
+
$ kubectl create -f default-server-secret.yaml
8
+
```
9
9
10
-
To deploy the NGINX Plus controller, run:
11
-
```
12
-
$ kubectl create -f nginx-plus-ingress.yaml
13
-
```
10
+
1. To deploy the NGINX controller, run:
11
+
```
12
+
$ kubectl create -f nginx-ingress.yaml
13
+
```
14
+
To deploy the NGINX Plus controller, run:
15
+
```
16
+
$ kubectl create -f nginx-plus-ingress.yaml
17
+
```
14
18
15
19
Once deployed, by default, a controller pod is running on every node of the cluster. The pods are accessible through ports 80 and 443 of each node they get scheduled on.
16
20
17
21
Optionally, you can choose to run the controller pods on only select nodes. To accomplish this:
18
22
1. Add a label to each node on which you want to run a controller pod. For example:
19
-
```
20
-
kubectl label node node-1 role=nginx-ingress
21
-
kubectl label node node-2 role=nginx-ingress
22
-
```
23
-
where *node-1* and *node-2* are some nodes of your cluster.
23
+
```
24
+
kubectl label node node-1 role=nginx-ingress
25
+
kubectl label node node-2 role=nginx-ingress
26
+
```
27
+
where *node-1* and *node-2* are some nodes of your cluster.
24
28
25
29
1. Uncomment the **nodeSelector** related lines (11-12) in the corresponding daemon set yaml file and specify a label to use to select nodes (`role=nginx-ingress` in this example).
NGINX Plus supports validating JWTs with [ngx_http_auth_jwt_module](http://nginx.org/en/docs/http/ngx_http_auth_jwt_module.html).
4
+
5
+
The Ingress controller provides the following 4 annotations for configuring JWT validation:
6
+
7
+
* Required: ```nginx.com/jwt-key: "secret"``` -- specifies a Secret resource with keys for validating JWTs. The keys must be stored in the `jwk` data field.
8
+
* Optional: ```nginx.com/jwt-realm: "realm"``` -- specifies a realm.
9
+
* Optional: ```nginx.com/jwt-token: "token"``` -- specifies a variable that contains JSON Web Token. By default, a JWT is expected in the `Authorization` header as a Bearer Token.
10
+
* Optional: ```nginx.com/jwt-login-url: "url"``` -- specifies a URL to which a client is redirected in case of an invalid or missing JWT.
11
+
12
+
## Example
13
+
14
+
In the following example we enable JWT validation for the cafe-ingress Ingress:
Copy file name to clipboardExpand all lines: nginx-controller/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ There are other cases when you need to build your own image. For example if you
15
15
Before you can build the image, make sure that the following software is installed on your machine:
16
16
*[Docker](https://www.docker.com/products/docker)
17
17
*[GNU Make](https://www.gnu.org/software/make/)
18
+
*[OpenSSL](https://www.openssl.org/), optionally, if you would like to generate a self-signed certificate and a key for the default server.
18
19
19
20
Additionally, for NGINX Plus, you must have the NGINX Plus license. If you don't have one, you can sign up for a [free 30-day trial](https://www.nginx.com/free-trial-request/). Put the certificate (`nginx-repo.crt`) and the key (`nginx-repo.key`) of your license inside this folder.
0 commit comments