Step 4: Create a Load Balancer
Creating a Load Balancer to configure network ports to access the application
Last updated
Was this helpful?
Creating a Load Balancer to configure network ports to access the application
Last updated
Was this helpful?
Now that your DuploCloud Service is running, you have a mechanism to expose the containers and images in which your application resides. But because your containers are running inside a private network, you also need a load balancer to listen on the correct ports in order to access the application.
In this step, we add a Load Balancer Listener to complete this network configuration.
Estimated time to complete Step 4: 10 minutes.
Before creating a Load Balancer, verify that you accomplished the tasks in the previous tutorial steps. Using the DuploCloud Portal, confirm that:
An exist, both with the name you created.
The Infrastructure you created has .
A with the name you chose has been created.
A with the name you chose has been created.
In the Tenant list box, on the upper-left side of the DuploCloud Portal, select the Tenant that you created.
All containers are running inside a private network and cannot be accessed from an external network. To do so one can create a load balancer.
In the DuploCloud Portal, navigate to Kubernetes -> Services. The Services page displays.
From the Name column, click on the name of your Service
Click the Load Balancers tab.
Click the Configure Load Balancer link. The Add Load Balancer Listener pane displays.
From the Type list box, select Application LB.
In the Container Port field, enter 80. This is the configured port on which the application inside the Docker Container Image is running.
In the External Port field, enter 80. This is the port through which users will access the web application.
From the Visibility list box, select Public.
From the Application Mode list box, select Docker Mode.
In the Health Check field, enter /
(forward-slash) to indicate that Kubernetes should check the health of the service at the root of the application.
In the Backend Protocol list box, select HTTP. HTTP is used for this tutorial since we are not setting up SSL certificates. However, using HTTPS to encrypt data between the user and the server when configuring Load Balancers is highly recommended. If you decide to use HTTPS, you must .
Certificates: You can leave this field empty, as SSL certificates are not necessary for this tutorial. However, we recommend using SSL certificates with Load Balancers to ensure secure HTTPS connections. If you'd like to add SSL certificates for your domain later, follow the instructions .
Click Add. The Load Balancer is created and initialized. In approximately 2-3 minutes you will see the load balancer details available in the portal. When the Load Balancer is ready for use the LB Status card displays Ready.
From the DuploCloud portal, navigate to Kubernetes -> Services.
Click on the name of your Service.
Verify that the Load Balancer has a status of Ready on the LB Status card.