Load Balancing

Uplift Topic 3: Simplified configuration for load balancing

Load balancing VMs typically requires multiple different tools and configurations to work properly. For example, to load balance two VMs internally and externally you might:

  1. Create a private internal load balancer

  2. Create an internet facing endpoint and route it to the internal load balancer

  3. Create private DNS records for the internal load balancer

  4. Create public DNS records for the public endpoint for external access

  5. Register VMs with the load balancer

  6. Configure the listening/forwarding port or port translation

  7. Configure health check endpoints and tests

  8. Configure health check timeouts and intervals

Networking and load balancing within OpenShift has been trivialized - let’s walk through the steps to setup internal and external load balancing within OpenShift.

Setting Up Load Balancing

  1. Go to your “windowsnetworking” namespace, on the left hand side click the “Virtualization” tab

  2. Click “VirtualMachines” and click on the winnetworking1 VM. Click the “YAML” tab and search for “app: winnetworking”. This is an arbitrary label assigned to both VMs.

  3. On the left side of the console, click to expand “Networking”. Click “Services”.

  4. In the top right corner, click “Create Service”. On line 4, change the name to “windowsnetworking”.

  5. Modify line 8 to read “app: winnetworking”

  6. Change the “targetPort:” value on line 12 to 80 then click “Create” in the bottom left corner

  7. Click the “Pods” tab and notice that the two winnetworking VMs have already registered with the service object. This will allow applications within the OpenShift cluster to access these VMs through the windowsnetworking “load balancer”.

  8. On the left side, under “Services”, click “Routes” then click “Create Route”.

  9. In the “Name” field put windowsnetworking

  10. Click the drop down box below “Service” and select the windowsnetworking service you just created.

  11. Click the drop down box below “Target port” and select port 80 then click “Create” in the bottom left corner.

  12. In the middle right, see the “Location” section.

  13. Click the link to view your load balanced virtual machines.

if this step fails, check to see if your browser redirected the http connection to https

Add VMs to service object

Create route