Configure ambient data plane components
In ambient mode, the key data plane components are Ztunnel and Waypoint. The Ztunnel component is deployed as a DaemonSet and handles L4 traffic on each node. The Waypoint component is deployed as a standalone Deployment to handle L7 traffic for specific Services or Pods.
Configure Ztunnel resources
The ASM control plane deploys the Ztunnel component as a DaemonSet to your data plane cluster. You can modify the ASMMeshConfig resource using kubectl to configure Ztunnel. The following is a sample ASMMeshConfig configuration.
Starting from ASM version 1.22, management of ASMMeshConfig resources using the data plane kubeconfig is enabled by default. If you encounter an error such as "resource not found", ensure that the Enable Data-plane KubeAPI access feature is enabled for your ASM instance.
apiVersion: istio.alibabacloud.com/v1beta1
kind: ASMMeshConfig
metadata:
name: default
spec:
......
ambientConfiguration:
enabled: true
redirectMode: ""
waypoint: {}
ztunnel:
# The graceful shutdown period for Ztunnel.
# During this time, old Ztunnel instances continue to process existing connections.
terminationGracePeriodSeconds: 30
# Resource configuration for Ztunnel.
resources:
limits:
cpu: "2"
memory: 1024Mi
requests:
cpu: 200m
memory: 256Mi
......
To modify the configuration, follow these steps:
-
Save the current ASMMeshConfig configuration to a local file.
kubectl get ASMMeshConfig default -o yaml > asmmeshconfig.yaml -
Edit the local asmmeshconfig.yaml file to modify the
resourcesfield in theztunnelsection. -
Apply the configuration.
kubectl apply -f asmmeshconfig.yaml
Configure Waypoint components
Waypoint components are configured using Gateway resources from the Gateway API and deployed as a Deployment in the data plane cluster. This allows multiple Waypoint instances to exist in your cluster. This allows you to flexibly route requests for a specific service or workload through a particular Waypoint.
The ASMMeshConfig resource also stores the global configuration for Waypoint, as shown in the following example.
apiVersion: istio.alibabacloud.com/v1beta1
kind: ASMMeshConfig
metadata:
name: default
spec:
......
ambientConfiguration:
enabled: true
redirectMode: ""
waypoint:
proxyResources:
limits:
cpu: "2"
memory: 1024Mi
requests:
cpu: 200m
memory: 256Mi
ztunnel:
resources:
limits:
cpu: "2"
memory: 1024Mi
requests:
cpu: 200m
memory: 256Mi
......
You can modify the global configuration for Waypoint using steps similar to those for Ztunnel.