Layer 7 routing supports multiple capabilities, such as URI path matching and request header matching. This topic describes the preparations for implementing capabilities related to Layer 7 routing.
Prerequisites
A Service Mesh (ASM) instance of Enterprise Edition is created. For more information, see Create an ASM instance.
In the Dataplane Mode section of the Create Service Mesh page, do not select Enable Ambient Mesh mode.
A Container Service for Kubernetes (ACK) cluster is created. For more information about how to create a cluster, see Create an ACK dedicated cluster or Create an ACK managed cluster.
The cluster is added to the ASM instance. For more information, see Add a cluster to an ASM instance.
Automatic sidecar proxy injection is enabled for the default namespace. For more information, see the "Enable automatic sidecar proxy injection" section of the Manage global namespaces topic.
Procedure
Deploy the helloworld, sleep, HTTPBin, or NGINX services in the ACK cluster based on your business requirements.
Deploy the helloworld service
Use the following content to create a helloworld-application.yaml file.
Use kubectl to connect to the ACK cluster based on the information in the kubeconfig file, and then run the following command to deploy the helloworld service:
kubectl apply -f helloworld-application.yaml
Deploy the sleep service
Use the following content to create a sleep-application.yaml file.
Use kubectl to connect to the ACK cluster based on the information in the kubeconfig file, and then run the following command to deploy the sleep service:
kubectl apply -f sleep-application.yaml
Deploy the HTTPBin service
Use the following content to create an httpbin-application.yaml file.
Use kubectl to connect to the ACK cluster based on the information in the kubeconfig file, and then run the following command to deploy the HTTPBin service:
kubectl apply -f httpbin-application.yaml
Deploy the NGINX service
Use the following content to create an nginx.yaml file.
Use kubectl to connect to the ACK cluster based on the information in the kubeconfig file, and then run the following command to deploy the NGINX service:
kubectl apply -f nginx.yaml