The HTTP domain name access has been configured. For more information, see Simple routing - configure domain names.
HTTPS is supported at the Server Load Balancer layer. To support HTTPS, create a Server Load Balancer certificate.
After the certificate is successfully created, locate the Server Load Balancer instance that is assigned during cluster creation.
When you create a cluster, Container Service assigns a Server Load Balancer instance to the cluster, and the instance only belongs to you.
On the Container Service console, click Clusters in the left-side navigation pane. Click Manage at the right of the cluster (test in this example).
Click Load Balancer Settings in the left-side navigation pane and view the Server Load Balancer ID.
Click Products > Server Load Balancer to go to the Server Load Balancer console.
View the IP address of the Server Load Balancer instance according to the instance ID.
Click Listeners in the left-side navigation pane and click Add Listener. The Add Listener dialog box appears. Enter the port information as follows:
| | Protocol | Port |
| Frontend protocol (port) | HTTPS | 443 |
| Backend protocol (port) | HTTP | 9080 |
HTTPSfor the frontend protocol.
Set the frontend port to 443 and backend port to 9080 (port 9080 is exposed by the routing service acsrouting_routing on each Elastic Compute Service (ECS) host. According to the HTTP
HOSTheader, all the HTTP requests are forwarded on the routing service acsrouting_routing to corresponding containers that provide various services).
Select the preceding certificate www.example.com.
Complete other settings based on your needs.
Complete the settings in the Health Check Configuration step and then click Confirm.
You can select to disable or enable the health check. To enable the health check, enter your own domain name in the Domain Name field or enter
/haproxy-monitorin the Health Check Path field. Otherwise, the health check reports an exception.
Click Confirm after the configurations.
Access the page
After the preceding configurations, to directly redirect to
https://www.example.com after accessing
http://www.example.com, see Simple routing - force to redirect from HTTP to HTTPS.