edit-icon download-icon

Simple routing - configure domain names

Last Updated: Feb 14, 2018

Procedure

  1. Log on to the Container Service console.

  2. Click Services in the left-side navigation pane.

  3. Select the cluster in which the service you want to add a domain name resides from the Cluster list.

  4. Click Update at the right of the service you want to add a domain name (the service wordpress_web of the application wordpress in this example).

    1

  5. Click the plus icon next to Container Label. Enter the domain name to be added (www.51ili.com is added in this example), and click Update to update the configurations.

    Note: To add multiple domain names under the same port for the same service, enter the domain names in one entry and separate them by semicolons (;).

    1

    Wait until the service finishes the update and changes to the Ready status. After that, the routing service acsrouting_routing finishes configuring the domain name. When requests containing the domain name www.51ili.com are sent to access the service wordpress_web, the requests can be correctly resolved and forwarded to the corresponding service.

  6. Resolve the domain name to the Container Service cluster. When you create a cluster, Container Service assigns a Server Load Balancer instance to the cluster by default. The assigned Server Load Balancer instance only belongs to you.

    1. Click Clusters in the left-side navigation pane in the Container Service console.
    2. Click Manage at the right of the cluster (test in this example).

      1

    3. Click Load Balancer Settings in the left-side navigation pane and view the Server Load Balancer ID.

      1

    4. Click Products > Server Load Balancer to go to the Server Load Balancer console.

    5. View the IP address of the Server Load Balancer instance according to the instance ID.

      1

  7. Log on to the Alibaba Cloud DNS console and add a DNS record (www.51ili.com in this example).

    • Add a domain name. For more information, see Add and manage domain names. Skip this step if the domain name already exists.
    • Add a DNS record. For more information, see Add and manage records.

      • Type: Select A - IPV4 address.
      • Host: Enter www. This is the domain name prefix. You can also enter another prefix.
      • ISP Line: Select Default.
      • Value: Enter the IP address of the bound Server Load Balancer instance.
      • TTL: Select the time.

      1

  8. Redeploy the application (wordpress in this example) in the Container Service console.

  9. Click the application name (wordpress in this example) and then click the Routes tab. The DNS takes effect.

    1

  10. Access www.51ili.com.

    访问页面

Thank you! We've received your feedback.