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 an SLB instance.
Notice The created SLB instance must be in the same VPC as the application to which the SLB instance will be bound.

Background information

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

  • User-created Kubernetes cluster: Purchase a new SLB instance for each application. Each application exclusively uses an SLB instance.
  • ACK cluster: 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, the application exclusively uses the instance.

Bind a new SLB instance

  1. Perform one of the following operations as needed to go to the application details page:
    • 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 namespace. On the Container Service Kubernetes Cluster or Serverless Kubernetes Clusters page, click a cluster ID. In the Applications section of the Cluster Details page, click the name of the application for which you want to view the details.
    • 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 namespace. Select Container Service or Serverless Kubernetes Cluster from the Cluster Type drop-down list and click the application name.
  2. On the Application Overview page, click the Plus sign 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 SLB instance information, or click the icon to unbind the SLB instance from your application.
  3. In the SLB (Public Network) dialog box, set SLB parameters.
    1. From the Select SLB drop-down list, select Create SLB, click Modify on the right side, and then select the SLB instance specifications 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 Pricing to view the pricing of SLB.

    2. Configure a listener.
      • TCP:
        • SLB Port(Application): This is the frontend port of the Internet-facing SLB instance, which can be used to access the application. Valid values: 1 to 65535.
        • Container Port(Target Port): The port on which a process listens. The port is typically defined by the application. For example, a web application uses port 8080 by default.
      • HTTPS:
        • HTTPS Port(Application): This is the frontend port of the public SLB instance, which can be used to access the application. Value range: 1 - 65535.
        • SSL Certificate: This is an 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. The port is typically 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.
  4. Optional:If the number of access requests for your application exceeds the existing SLB instance specifications, repeat Step 3 to Step 4 to add SLB instances.
    Note The specification metrics of an SLB instance include Maximum Connections, New Connections Per Second, and Queries Per Second. If the number of access requests to the application exceeds the specification metrics 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 Enter to go to the homepage of the corresponding application.

If the IP address and port number do not appear on the right side of the SLB instance, the binding failed. Go to Change List to view the change details, and troubleshoot the failure based on the change records.