|
6 | 6 |
|
7 | 7 | <br/> |
8 | 8 |
|
9 | | - |  |  |  |
| 9 | + |  |  |  |
10 | 10 | --- | --- | --- | --- |
11 | 11 |
|
12 | 12 | <br/> |
|
17 | 17 |
|
18 | 18 | 1. Provides a `replacement Loadbalancer Service.` The Loadbalancer Service is a key component provided by most Cloud Providers. However, when running a K8s Cluster On Premises, the `Loadbalancer Service is not available`. |
19 | 19 | 2. This Solution provides a replacement, using an NGINX Server, and a new K8s Controller from NGINX. These two components work together to watch the `nginx-ingress Service` in the cluster, and immediately update the NGINX LB Server when changes occur. |
20 | | -- Provides automatic NGINX upstream config updates, application health checks, and enhanced metrics. |
| 20 | +3. Provides automatic NGINX upstream config updates, application health checks, and enhanced metrics. |
21 | 21 |
|
22 | 22 | <br/> |
23 | 23 |
|
|
39 | 39 |
|
40 | 40 | ### Pre-Requisites |
41 | 41 |
|
42 | | -- Working kubernetes cluster, with admin privleges |
| 42 | +- Working Kubernetes cluster, with admin privleges |
43 | 43 | - Running `nginx-ingress controller`, either OSS or Plus. This install guide followed the instructions for deploying an NGINX Ingress Controller here: https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-manifests/ |
44 | 44 | - Demo application, this install guide uses the NGINX Cafe example, found here: https://github.com/nginxinc/kubernetes-ingress/tree/main/examples/ingress-resources/complete-example |
45 | 45 | - A bare metal Linux server or VM for the external NGINX LB Server, connected to a network external to the cluster. Two of these will be required if High Availability is needed, as shown here. |
@@ -205,7 +205,7 @@ server { |
205 | 205 | ``` |
206 | 206 |
|
207 | 207 | - Enable the NGINX Plus dashboard. Use the `dashboard.conf` file provided. It will enable the /api endpoint, change the port to 9000, and provide access to the Plus Dashboard. Note: There is no security for the /api endpoint in this example config, it should be secured as approprite with TLS or IP allow list. |
208 | | -- Place this file in the /etc/nginx/conf.d folder, and reload nginx. The Plus dashboard is now accessible at http://<nginx-lbserver-ip>:9000/dashboard.html. It should look similar to this: |
| 208 | +- Place this file in the /etc/nginx/conf.d folder, and reload nginx. The Plus dashboard is now accessible at http://nginx-lbserver-ip:9000/dashboard.html. It should look similar to this: |
209 | 209 |
|
210 | 210 |  |
211 | 211 |
|
@@ -318,7 +318,7 @@ stream { |
318 | 318 |
|
319 | 319 | ``` |
320 | 320 |
|
321 | | -- Check the NGINX Plus Dashboard, at http://<nginx-lbserver-ip>:9000/dashboard.html. You should see something like this: |
| 321 | +- Check the NGINX Plus Dashboard, at http://nginx-lbserver-ip:9000/dashboard.html. You should see something like this: |
322 | 322 |
|
323 | 323 |  |
324 | 324 |
|
@@ -362,7 +362,7 @@ apiVersion: v1 |
362 | 362 | kind: ConfigMap |
363 | 363 | data: |
364 | 364 | nginx-hosts: |
365 | | - "http://10.1.1.4:9000/api,http://10.1.1.5:9000/api" # change IP(s) to match NGINX LB Server(s) |
| 365 | + "http://10.1.1.4:9000/api,http://10.1.1.5:9000/api" # change IP(s) to match NGINX LB Server(s) |
366 | 366 | metadata: |
367 | 367 | name: nkl-config |
368 | 368 | namespace: nkl |
@@ -546,15 +546,14 @@ kubectl get svc nginx-ingress -n nginx-ingress |
546 | 546 |
|
547 | 547 | <br/> |
548 | 548 |
|
549 | | -The name of the Service port is matched to the name of the upstream block in NGINX. The Plus API, follows a defined format, so the url for the API call must be correct, in order to update the correct NGINX upstream block. There are 2 types of upstreams in NGINX. `Stream` upstreams are used in the stream context, for TCP/UDP load balancing configurations. `Http` upstreams are used in the http context, for HTTP/HTTPS configurations. (See details for HTTP in the http-installation-guide.md, here: [HTTP Guide](../http/http-installation-guide.md) |
| 549 | +The name of the Service port is matched to the name of the upstream block in NGINX. The Plus API, follows a defined format, so the url for the API call must be correct, in order to update the correct NGINX upstream block. There are 2 types of upstreams in NGINX. `Stream` upstreams are used in the stream context, for TCP/UDP load balancing configurations. `Http` upstreams are used in the http context, for HTTP/HTTPS configurations. (See details for HTTP in the http-installation-guide.md, here: [HTTP Guide](../http/http-installation-guide.md). |
550 | 550 |
|
551 | 551 | <br/> |
552 | 552 |
|
553 | 553 | ## 7. Testing NKL NGINX Kubernetes Loadbalancer |
554 | 554 |
|
555 | 555 | <br/> |
556 | 556 |
|
557 | | - |
558 | 557 | When you are finished, the NGINX Plus Dashboard on the LB Server should look similar to the following image: |
559 | 558 |
|
560 | 559 |  |
@@ -623,6 +622,11 @@ kubectl get svc nginx-ingress -n nginx-ingress |
623 | 622 |
|
624 | 623 | `The NKL Controller detects this change, and modifies the LB Server(s) upstreams to match.` The Dashboard will show you the new Port numbers, matching the new LoadBalancer or NodePort definitions. The NKL logs show these messages, confirming the changes: |
625 | 624 |
|
| 625 | + |
| 626 | + |
| 627 | +or |
| 628 | + |
| 629 | + |
626 | 630 |  |
627 | 631 |  |
628 | 632 |
|
|
0 commit comments