Configure SLB

Last updated:2021-08-30 17:22:08

This topic describes how to configure container instances as the backend servers of a Server Load Balancing (SLB) listener and expose services to the Internet through SLB.


Create container instances

In this example, three NGINX container instances with the port 80 are created. For more information about the creation procedure, see Create a container group.

Create an SLB instance

In this example, the NGINX service is exposed to the Internet, which requires an elastic IP address (EIP). You can create an SLB instance and bind it to an EIP in the SLB console. For more information about the creation procedure, see Create an SLB instance.

Add container instances as SLB backend servers

You can add your container instances as SLB backend servers by using the SDK or the console. In this example, the console is used.

Create a listener for the SLB instance

  1. Log in to the SLB console.
  2. In the SLB instance list, find the target SLB instance and click Enter SLB in the Operation column.
  3. On the Listener page, click Create Listener.
  4. On the page that appears, select the three NGINX container instances and add them as the SLB backend servers. Use 80 as the port number because the container instances use the port 80.
  5. Click OK.


You can verify the NGINX service by using the IP address and port number of the SLB instance.


Did you find the above information helpful?

Mostly Unhelpful
A little helpful
Very helpful

What might be the problems?

Unclear or awkward
Redundant or clumsy
Lack of context for the complex system or functionality

More suggestions


Please give us your feedback.


Thank you for your feedback.