Skip to content

Commit 96ac5fb

Browse files
chrisakkerciroque
authored andcommitted
add single cluster config
1 parent f72cfef commit 96ac5fb

File tree

4 files changed

+72
-0
lines changed

4 files changed

+72
-0
lines changed

docs/http/http-installation-guide.md

+20
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,12 @@ This can be any standard Linux OS system, based on the Linux Distro and Technica
207207

208208
>NOTE: This Solution will only work with NGINX Plus, as NGINX OpenSource does not have the API that is used in this Solution. Installation on unsupported Linux Distros is not recommended.
209209

210+
1. Install the NGINX Javascript module (njs). This is required for exporting Prometheus Metrics from NGINX Plus.
211+
212+
```bash
213+
yum install nginx-plus-module-njs
214+
```
215+
210216
1. If you need a license for NGINX Plus, a 30-day Trial license is available here:
211217

212218
https://www.nginx.com/free-trial-request/
@@ -1081,6 +1087,20 @@ Here are the instructions to run 2 Docker containers on a Monitor Server, which
10811087
10821088
<br/>
10831089
1090+
## References ##
1091+
1092+
[NGINX Ingress Controller](https://docs.nginx.com/nginx-ingress-controller/)
1093+
[NGINX Cafe Demo](https://github.com/nginxinc/kubernetes-ingress/tree/main/examples/ingress-resources/complete-example)
1094+
[Installing NGINX Plus](https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-plus/)
1095+
[NGINX Loadbalancer for Kubernetes Overview](https://github.com/nginxinc/nginx-loadbalancer-kubernetes/tree/main/docs)
1096+
[NGINX Split Clients Module](https://nginx.org/en/docs/http/ngx_http_split_clients_module.html)
1097+
[NGINX Dynamic Split Clients Blog](https://www.nginx.com/blog/dynamic-a-b-testing-with-nginx-plus/)
1098+
[NGINX njs Module](https://docs.nginx.com/nginx/admin-guide/dynamic-modules/nginscript/)
1099+
[Prometheus](https://prometheus.io/)
1100+
[Grafana](https://grafana.com/)
1101+
1102+
<br/>
1103+
10841104
## Authors
10851105
- Chris Akker - Solutions Architect - Community and Alliances @ F5, Inc.
10861106
- Steve Wagner - Solutions Architect - Community and Alliances @ F5, Inc.

docs/http/single-cluster.conf

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# NGINX Loadbalancer for K8s HTTP configuration, for L7 load balancing
2+
# Chris Akker, Oct 2023
3+
# HTTP Proxy and load balancing
4+
# Single Cluster Load Balancing
5+
# Upstream servers managed by NLK Controller
6+
#
7+
#### single-clusters.conf
8+
9+
# Main Nginx Server Block for cafe.example.com, with TLS
10+
11+
server {
12+
listen 443 ssl;
13+
status_zone https://cafe.example.com;
14+
server_name cafe.example.com;
15+
16+
ssl_certificate /etc/ssl/nginx/default.crt; # self-signed for example only
17+
ssl_certificate_key /etc/ssl/nginx/default.key;
18+
19+
location / {
20+
status_zone /;
21+
22+
proxy_set_header Host $host;
23+
proxy_http_version 1.1;
24+
proxy_set_header "Connection" "";
25+
proxy_pass https://cluster1-https;
26+
27+
}
28+
29+
location @health_check_cluster1_cafe {
30+
31+
health_check interval=10 match=cafe;
32+
proxy_connect_timeout 2s;
33+
proxy_read_timeout 3s;
34+
proxy_set_header Host cafe.example.com;
35+
proxy_pass https://cluster1-https;
36+
}
37+
38+
}
39+
40+
match cafe {
41+
status 200-399;
42+
}
43+
44+
# Cluster1 upstreams
45+
46+
upstream cluster1-https {
47+
zone cluster1-https 256k;
48+
least_time last_byte;
49+
keepalive 16;
50+
#servers managed by NLK Controller
51+
state /var/lib/nginx/state/cluster1-https.state;
52+
}

docs/media/nkl-blog-diagram-v2.png

610 KB
Loading

docs/media/nkl-desktop-background.png

415 KB
Loading

0 commit comments

Comments
 (0)