Step 6: Create a Load Balancer

Creating a Load Balancer to configure network ports to access the application

Now that your DuploCloud Service is running, you have a mechanism to expose the containers and images in which your application resides. However, since your containers are inside a private network, you need a Load Balancer listening on the correct ports to access the application.

In this step, we add a Load Balancer Listener to complete the network configuration.

Estimated time to complete Step 6: 10 minutes.

Prerequisites

Before creating a Load Balancer, verify that you completed the tasks in the previous tutorial steps. Using the DuploCloud Portal, confirm that:

Creating a Load Balancer

  1. In the Tenant list box, select the dev01 Tenant.

  2. In the DuploCloud Portal, navigate to Kubernetes -> Services.

  3. From the NAME column, select demo-service.

  4. Click the Load Balancers tab.

  5. Click the Configure Load Balancer link. The Add Load Balancer Listener pane displays.

The Add Load Balancer Listener pane
  1. From the Type list box, select Application LB.

  2. In the Container Port field, enter 3000. This is the configured port on which the application inside the Docker Container Image duplocloud/nodejs-hello:latest is running.

  3. In the External Port field, enter 80. This is the port through which users will access the web application.

  4. From the Visibility list box, select Public.

  5. From the Application Mode list box, select Docker Mode.

  6. Type / (forward-slash) in the Health Check field to indicate that the cluster we want Kubernetes to perform Health Checks on is located at the root level.

  7. In the Backend Protocol list box, select HTTP.

  8. Click Add. The Load Balancer is created and initialized. Monitor the LB Status card on the Services page. The LB Status card displays Ready when the Load Balancer is ready for use.

Checking your work

  1. In the Tenant list box, select the dev01 Tenant.

  2. In the DuploCloud Portal, navigate to Kubernetes -> Services.

  3. From the NAME column, select demo-service.

  4. Verify that the LB Status card displays a status of Ready.

  5. Note the DNS Name of the Load Balancer that you created.

  6. In the LB Listeners area of the Services page, note the configuration details of the Load Balancer's HTTP protocol, which you specified, when you added it above.

The Services details page with Ready LB Status highlighted

Last updated

Was this helpful?