In this configuration, the load balancer is positioned in front of your nodes. The load balancer can be any host capable of running NGINX.

One caveat: do not use one of your Rancher nodes as the load balancer.

The stream module is required, which is present when using the official NGINX packages. Please refer to your OS documentation on how to install and enable the NGINX stream module on your operating system.

After installing NGINX, you need to update the NGINX configuration file, , with the IP addresses for your nodes.

  1. Copy and paste the code sample below into your favorite text editor. Save it as nginx.conf.

  2. Save nginx.conf to your load balancer at the following path: /etc/nginx/nginx.conf.

Instead of installing NGINX as a package on the operating system, you can rather run it as a Docker container. Save the edited Example NGINX config as and run the following command to launch the NGINX container: