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
Create an ASM Enterprise instance and select Enable Ambient Mesh Mode. For more information, see Create an ASM instance.
Create a Kubernetes cluster that meets the requirements for Kubernetes clusters and configurations. For more information, see Create an ACK dedicated cluster (no longer available for new users) or Create an ACK managed cluster.
You have downloaded the ASM debugging tool, istioctl, based on your operating system and platform. For more information, see Istio.
Step 1: Set the data plane mode to Ambient Mesh
Set the data plane mode of the global namespace named default to Ambient Mesh.
Log on to the ASM console. In the left-side navigation pane, choose .
On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose .
On the Global Namespace page, find the default namespace and click Switch to Ambient Mesh Mode in the Dataplane Mode column. In the Submit message, click OK.
Step 2: Enable Waypoint for the default namespace
In Ambient mode, Layer 7 features depend on Waypoint. This step enables Waypoint for all services in the default namespace.
Create a Gateway resource. ASM creates a Waypoint proxy based on this resource.
kubectl apply -f - <<EOF apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: waypoint spec: gatewayClassName: istio-waypoint listeners: - name: mesh port: 15008 protocol: HBONE EOFEnable Waypoint for all services in the default namespace.
kubectl label namespace default istio.io/use-waypoint=waypoint --overwrite
Step 3: Deploy services in the data plane cluster
Deploy the helloworld, sleep, HTTPBin, NGINX, or mocka services as needed.
Deploy the helloworld service
Use the following content to create a helloworld-application.yaml file.
Deploy the helloworld application.
kubectl apply -f helloworld-application.yaml
Deploy the sleep service
Create a sleep-application.yaml file.
Deploy the sleep application.
kubectl apply -f sleep-application.yaml
Deploy the HTTPBin service
Create an httpbin-application.yaml file.
Deploy the httpbin application.
kubectl apply -f httpbin-application.yaml
Deploy the NGINX service
You can create an NGINX application.
Deploy the nginx application.
kubectl apply -f nginx.yaml
Deploy the mocka service
Create a mocka-application.yaml file.
Deploy the mocka application.
kubectl apply -f mocka-application.yaml