Skip to content

add single cluster config #126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/http/http-installation-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,12 @@ This can be any standard Linux OS system, based on the Linux Distro and Technica

>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.

1. Install the NGINX Javascript module (njs). This is required for exporting Prometheus Metrics from NGINX Plus.

```bash
yum install nginx-plus-module-njs
```

1. If you need a license for NGINX Plus, a 30-day Trial license is available here:

https://www.nginx.com/free-trial-request/
Expand Down Expand Up @@ -1081,6 +1087,20 @@ Here are the instructions to run 2 Docker containers on a Monitor Server, which

<br/>

## References ##

- [NGINX Ingress Controller](https://docs.nginx.com/nginx-ingress-controller/)
- [NGINX Cafe Demo](https://github.com/nginxinc/kubernetes-ingress/tree/main/examples/ingress-resources/complete-example)
- [Installing NGINX Plus](https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-plus/)
- [NGINX Loadbalancer for Kubernetes Overview](https://github.com/nginxinc/nginx-loadbalancer-kubernetes/tree/main/docs)
- [NGINX Split Clients Module](https://nginx.org/en/docs/http/ngx_http_split_clients_module.html)
- [NGINX Dynamic Split Clients Blog](https://www.nginx.com/blog/dynamic-a-b-testing-with-nginx-plus/)
- [NGINX njs Module](https://docs.nginx.com/nginx/admin-guide/dynamic-modules/nginscript/)
- [Prometheus](https://prometheus.io/)
- [Grafana](https://grafana.com/)

<br/>

## Authors
- Chris Akker - Solutions Architect - Community and Alliances @ F5, Inc.
- Steve Wagner - Solutions Architect - Community and Alliances @ F5, Inc.
52 changes: 52 additions & 0 deletions docs/http/single-cluster.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# NGINX Loadbalancer for K8s HTTP configuration, for L7 load balancing
# Chris Akker, Oct 2023
# HTTP Proxy and load balancing
# Single Cluster Load Balancing
# Upstream servers managed by NLK Controller
#
#### single-clusters.conf

# Main Nginx Server Block for cafe.example.com, with TLS

server {
listen 443 ssl;
status_zone https://cafe.example.com;
server_name cafe.example.com;

ssl_certificate /etc/ssl/nginx/default.crt; # self-signed for example only
ssl_certificate_key /etc/ssl/nginx/default.key;

location / {
status_zone /;

proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header "Connection" "";
proxy_pass https://cluster1-https;

}

location @health_check_cluster1_cafe {

health_check interval=10 match=cafe;
proxy_connect_timeout 2s;
proxy_read_timeout 3s;
proxy_set_header Host cafe.example.com;
proxy_pass https://cluster1-https;
}

}

match cafe {
status 200-399;
}

# Cluster1 upstreams

upstream cluster1-https {
zone cluster1-https 256k;
least_time last_byte;
keepalive 16;
#servers managed by NLK Controller
state /var/lib/nginx/state/cluster1-https.state;
}
Binary file added docs/media/nkl-blog-diagram-v2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/media/nkl-desktop-background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.