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
Replaced README at site root with docs/README and removed refs to on-prem use cases
I've removed most references to the on-prem use cases and walkthrough docs for on-prem customers. If we want to add docs for on-prem users support will need to add these.
[](https://www.repostatus.org/#active)
The NGINX Loadbalancer for Kubernetes, or _NLK_, is a Kubernetes controller that provides TCP load balancing external to a Kubernetes cluster running on-premise.
14
+
## Welcome to the NGINX LoadBalancer for Kubernetes Solution
This repo contains source code and documents for a `Kubernetes Controller from NGINX`, that provides TCP and HTTP load balancing external to a Kubernetes cluster. The primary supported use case is for NGINXaaS for Azure's [Load Balancer for Kubernetes](https://docs.nginx.com/nginxaas/azure/loadbalancer-kubernetes/), where users integrate an Azure Kubernetes Service service with an NGINXaaS deployment. It should also be possible to use this controller to integrate an on-prem Kubernetes cluster with one or many NGINX plus instances.
24
20
25
-
[//]: #()
26
-
[//]: #(- [ ] If you find yourself living in a world where Kubernetes is running on-premise instead of a cloud provider, you might need NLK.)
21
+
## Overview
27
22
28
-
[//]: #(- [ ] If you want exceptional, best-in-class load-balancing for your Kubernetes clusters by using NGINX Plus, you might need NLK.)
23
+
-`NLK - NGINX Loadbalancer for Kubernetes` is a Kubernetes controller from NGINX that monitors specified Kubernetes services, and then sends API calls to an external NGINX Plus server to manage NGINX Upstream servers dynamically.
24
+
- This will `synchronize` the Kubernetes service's endpoints with the NGINX server's upstream list.
25
+
- One use case is to track the`NodePort` IP:Port definitions for the NGINX Ingress Controller's `nginx-ingress Service`.
26
+
- NLK is a native Kubernetes controller, running, configured and managed with standard Kubernetes commands.
27
+
- When NLK is paired with the NGINX Plus Server located external to the Kubernetes cluster, this controller will provide a `TCP Load Balancer Service` to the Kubernetes clusters.
28
+
- NLK paired with the NGINX Plus Server located external to the Cluster, using NGINX's advanced HTTP features, provides an `HTTP Load Balancer Service` for enterprise traffic management solutions, such as:
29
+
- MultiCluster Active/Active Load Balancing
30
+
- Horizontal Cluster Scaling
31
+
- HTTP Split Clients - for A/B, Blue/Green, and Canary test and production traffic steering. Allows Cluster operations/maintainence like upgrades, patching, expansion and troubleshooting with no downtime or reloads
- Advanced Security features - Oauth, JWT, App Protect WAF Firewall, Rate and Bandwidth limits
34
+
- NGINX Java Script (NJS) for custom solutions
35
+
- NGINX Zone Sync of KeyVal data
29
36
30
-
[//]: #(- [ ] If you want the ability to manage your load-balancing configuration with the same tools you use to manage your Kubernetes cluster, you might need NLK.)
37
+
## NLK Controller Software Design Overview - How it works
31
38
32
-
### What you will need
39
+
[NLK Controller DESIGN and Architecture](docs/DESIGN.md)
33
40
34
-
-[ ] A On-Premise Kubernetes cluster running version 1.24 or higher.
35
-
-[ ] One or more NGINX Plus hosts running outside your Kubernetes cluster (NGINX Plus hosts must have the ability to route traffic to the cluster).
41
+
## Development
36
42
37
-
There is a more detailed [Installation Reference](docs/README.md) available in the `docs/` directory.
38
-
39
-
### Why NLK?
40
-
41
-
NLK provides a simple, easy-to-manage way to automate load balancing for your Kubernetes applications by leveraging NGINX Plus hosts running outside your cluster.
42
-
43
-
NLK installs easily, has a small footprint, and is easy to configure and manage.
44
-
45
-
NLK does not require learning a custom object model, you only have to understand NGINX configuration to get the most out of this solution.
46
-
There is thorough documentation available with the specifics in the `docs/` directory.
47
-
48
-
### What does NLK do?
49
-
50
-
tl;dr:
51
-
52
-
_**NLK is a Kubernetes controller that monitors Services and Nodes in your cluster, and then sends API calls to an external NGINX Plus server to manage NGINX Plus Upstream servers automatically.**_
53
-
54
-
That's all well and good, but what does it mean? Kubernetes clusters require some tooling to handling routing traffic from the outside world (e.g.: the Internet, corporate network, etc.) to the cluster.
55
-
This is typically done with a load balancer. The load balancer is responsible for routing traffic to the appropriate worker node which then forwards the traffic to the appropriate Service / Pod.
56
-
57
-
If you are using a hosted Kubernetes solution -- Digital Ocean, AWS, Azure, etc. -- you can use the cloud provider's load balancer service. Those services will create a load balancer for you.
58
-
You can use the cloud provider's API to manage the load balancer, or you can use the cloud provider's web console.
59
-
60
-
If you are running Kubernetes on-premise and will need to manage your own load balancer, NLK can help.
61
-
62
-
NLK itself does not perform load balancing. Rather, NLK allows you to manage Service resources within your cluster to update your load balancers, with tooling you are most likely already using.
There are few bits of administrivia to get out of the way before you can start leveraging NLK for your load balancing needs.
69
-
70
-
As noted above, NLK is intended for when you have one or more Kubernetes clusters running on-premise. In addition to this,
71
-
you need to have at least one NGINX Plus host running outside your cluster (Please refer to the [Roadmap](#roadmap) for information about other load balancer servers).
72
-
73
-
### Deployment
74
-
75
-
#### RBAC
76
-
77
-
As with everything Kubernetes, NLK requires RBAC permissions to function properly. The necessary resources are defined in the various YAML files in `deployment/rbac/`.
78
-
79
-
For convenience, two scripts are included, `apply.sh`, and `unapply.sh`. These scripts will apply or remove the RBAC resources, respectively.
80
-
81
-
The permissions required by NLK are modest. NLK requires the ability to read Resources via shared informers; the resources are Services, Nodes, and ConfigMaps.
82
-
The Services and ConfigMap are restricted to a specific namespace (default: "nlk"). The Nodes resource is cluster-wide.
83
-
84
-
#### Configuration
85
-
86
-
NLK is configured via a ConfigMap, the default settings are found in `deployment/configmap.yaml`. Presently there is a single configuration value exposed in the ConfigMap, `nginx-hosts`.
87
-
This contains a comma-separated list of NGINX Plus hosts that NLK will maintain.
88
-
89
-
You will need to update this ConfigMap to reflect the NGINX Plus hosts you wish to manage.
90
-
91
-
If you were to deploy the ConfigMap and start NLK without updating the `nginx-hosts` value, don't fear; the ConfigMap resource is monitored for changes and NLK will update the NGINX Plus hosts accordingly when the resource is changed, no restart required.
92
-
93
-
There is an extensive [Installation Reference](docs/README.md) available in the `docs/` directory.
94
-
Please refer to that for detailed instructions on how to deploy NLK and run a demo application.
95
-
96
-
#### Versioning
97
-
98
-
Versioning is a work in progress. The CI/CD pipeline is being developed and will be used to build and publish NLK images to the Container Registry.
99
-
Once in place, semantic versioning will be used for published images.
100
-
101
-
#### Deployment Steps
102
-
103
-
To get NLK up and running in ten steps or fewer, follow these instructions (NOTE, all the aforementioned prerequisites must be met for this to work).
104
-
There is a much more detailed [Installation Reference](docs/README.md) available in the `docs/` directory.
105
-
106
-
1. Clone this repo (optional, you can simply copy the `deployments/` directory)
```kubectl -n nlk logs -f $(kubectl -n nlk get po -l "app=nlk" --no-headers -o custom-columns=":metadata.name")```
129
-
130
-
At this point NLK should be up and running. Now would be a great time to go over to the [Installation Reference](docs/README.md)
131
-
and follow the instructions to deploy a demo application.
132
-
133
-
### Monitoring
134
-
135
-
Presently NLK includes a fair amount of logging. This is intended to be used for debugging purposes.
136
-
There are plans to add more robust monitoring and alerting in the future.
137
-
138
-
As a rule, we support the use of [OpenTelemetry](https://opentelemetry.io/) for observability, and we will be adding support in the near future.
139
-
140
-
## Contributing
141
-
142
-
Presently we are not accepting pull requests. However, we welcome your feedback and suggestions.
143
-
Please open an issue to let us know what you think!
144
-
145
-
One way to contribute is to help us test NLK. We are looking for people to test NLK in a variety of environments.
146
-
147
-
If you are curious about the implementation, you should certainly browse the code, but first you might wish to refer to the [design document](docs/DESIGN.md).
148
-
Some of the design decisions are explained there.
149
-
150
-
## Roadmap
151
-
152
-
While NLK was initially written specifically for NGINX Plus, we recognize there are other load-balancers that can be supported.
153
-
154
-
To this end, NLK has been architected to be extensible to support other "Border Servers".
155
-
Border Servers are the term NLK uses to describe load-balancers, reverse proxies, etc. that run outside the cluster and handle
156
-
routing outside traffic to your cluster.
157
-
158
-
While we have identified a few potential targets, we are open to suggestions. Please open an issue to share your thoughts on potential implementations.
159
-
160
-
We look forward to building a community around NLK and value all feedback and suggestions. Varying perspectives and embracing
161
-
diverse ideas will be key to NLK becoming a solution that is useful to the community. We will consider it a success
162
-
when we are able to accept pull requests from the community.
43
+
Read the [`CONTRIBUTING.md`](https://github.com/nginx/nginx-loadbalancer-kubernetes/blob/main/CONTRIBUTING.md) file.
163
44
164
45
## Authors
165
46
@@ -170,6 +51,4 @@ when we are able to accept pull requests from the community.
170
51
171
52
[Apache License, Version 2.0](https://github.com/nginx/nginx-loadbalancer-kubernetes/blob/main/LICENSE)
0 commit comments