After an application is created in a Container Service for Kubernetes (ACK) cluster in Enterprise Distributed Application Service (EDAS), you can bind an Internet-facing or internal-facing Server Load Balancer (SLB) instance to the application so that the application can be accessed over the Internet or a private network. This topic describes how to bind an Internet-facing SLB instance to an application in an ACK cluster.

Prerequisites

An SLB instance is created in the SLB console. For more information, see Create a CLB instance.
Notice The created SLB instance must be in the same virtual private cloud (VPC) as the application to which you want to bind the SLB instance.

Background information

To bind an SLB instance to an application, you must modify the configurations of listeners for the SLB instance in the EDAS console.

Notice You cannot modify the configurations of the listeners and certificates in the SLB console. Otherwise, the modification may fail and make the application inaccessible.

The differences in binding SLB instances to applications in ACK clusters and user-created Kubernetes clusters involve the following aspects:

  • User-created Kubernetes cluster: You must purchase a new SLB instance for each application. Each application exclusively uses an SLB instance.
  • ACK cluster: You can purchase a new SLB instance for each application or use an existing SLB instance that is bound to other applications. If a newly purchased SLB instance is used for an application, the application exclusively uses the SLB instance.

Bind a new SLB instance

  1. Log on to the EDAS console.
  2. Go to the Application Overview page by using one of the following methods:
    • In the left-side navigation pane, choose Resource Management > Container Service Kubernetes Clusters or Resource Management > Serverless Kubernetes Clusters. In the top navigation bar, select a region. In the upper part of the page, select a microservice namespace. On the Container Service Kubernetes Clusters or Serverless Kubernetes Clusters page, click a cluster ID. In the Applications section of the Cluster Details page, click the name of the application that you want to manage.
    • In the left-side navigation pane, click Applications. In the top navigation bar, select a region. In the upper part of the page, select a microservice namespace. Select Container Service or Serverless Kubernetes Cluster from the Cluster Type drop-down list and click the name of the application that you want to manage.
  3. On the Application Overview page, click the Plus icon icon next to SLB (Public Network) in the Access configuration section.
    Note If you have bound an SLB instance to your application, the IP address and port number of the SLB instance are displayed. You can click the Edit icon to go to the configuration page to modify the information about the SLB instance, or click the icon to unbind the SLB instance from your application.
  4. In the SLB (Public Network) dialog box, set the parameters for the SLB instance.
    1. Select Create SLB from the Select SLB drop-down list, click Editing on the right side, and then select the specifications of the SLB instance as needed.

      EDAS automatically purchases a new SLB instance for your application. Information about the SLB instance is displayed in the lower part.

      You can click View price to view the pricing of SLB.

      Bind an SLB instance
    2. Configure a listener.
      • TCP:
        • SLB Port(Application): the frontend port of the Internet-facing SLB instance. This port can be used to access the application. Valid values: 1 to 65535.
        • Container Port (Target Port): the port on which a process listens. This port is defined by the application. For example, a web application uses port 8080 by default.
      • HTTPS:
        • HTTPS Port(Application): the frontend port of the Internet-facing SLB instance. This port can be used to access the application. Valid values: 1 to 65535.
        • SSL Certificate: the SSL certificate. You can select an uploaded SSL certificate from the drop-down list.
        • Container Port (Target Port): the port on which a process listens. This port is defined by the application. For example, a web application uses port 8080 by default.
      Note Multiple listeners are supported. You can click Add Listener to configure multiple listeners.
    3. Click OK.
  5. Optional:If the number of access requests for your application exceeds the specifications of the existing SLB instance, repeat Step 3 to Step 4 to add SLB instances.
    Note The specification metrics of an SLB instance include the maximum connections, new connections per second, and queries per second. If the number of access requests for the application exceeds the value of a specification metric of the SLB instance, you can bind more SLB instances to share the traffic pressure.

Verify the result

In the address bar of your browser, enter <IP address of the SLB instance>:<Port number of the SLB instance>, such as 115.XX.XX.XX:80, and then press the Enter key to go to the homepage of the corresponding application.

If the IP address and port number do not appear next to SLB (Public Network), the binding failed. Go to the Change List page to view the change details, and troubleshoot the failure based on the change records.