By Xining Wang
High-performance and high-availability of Alibaba Cloud Service Mesh (ASM) gateways ensure business continuity and improve user experience. This article describes how to configure an ASM gateway and schedule the pods of the gateway to a specified node. This improves the high availability of the ASM gateway and enhances the isolation between gateway pods and application pods.
Run kubectl get nodes
command to obtain the names of the nodes in the specific cluster. Select a node to which you want to add a label and execute the kubectl label nodes =
command to add the label to the desired node.
For example,
kubectl label nodes node1 mykey4pod=asmgateway
Run kubectl taint
to add a taint to the node. For example,
kubectl taint nodes node1 mykey=myvalue:NoSchedule
This command adds a taint to node 1. The key is mykey, the value is myvalue, and the effect is NoSchedule. This way, only pods that tolerate the taint can be scheduled to node 1.
Configure the nodeAffinity-related parameters of the ASM gateway so that the pods of the ASM gateway are scheduled to the corresponding nodes. Configure the tolerations-related parameters to match the taint created in Step 2. In this way, the pods of the ASM gateway can be scheduled to a specified node.
Procedure:
1) Log on to the ASM console. In the left-side navigation pane, choose Service Mesh > Mesh Management.
2) On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose ASM Gateways > Ingress Gateway.
3) On the Ingress Gateway page, find the gateway that you want to set and click YAML on the right.
4) In the Edit dialog box, add the following content to the spec field and click OK.
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: mykey4pod
operator: In
values:
- asmgateway
tolerations:
- key: "mykey"
operator: "Equal"
value: "myvalue"
effect: "NoSchedule"
In the ACK console, check whether the node where the pods of the gateway are located meets expectations.
Enable cgroup V2 on Alibaba Cloud Container Service for Kubernetes
Deploy a ASM Serverless Gateway to Support Elastic Business Scenarios
56 posts | 8 followers
FollowAlibaba Cloud Native - November 16, 2023
Xi Ning Wang(王夕宁) - September 20, 2023
Alibaba Cloud Indonesia - April 10, 2023
Alibaba Cloud Native Community - September 20, 2023
Xi Ning Wang(王夕宁) - May 26, 2023
Alibaba Developer - September 22, 2020
56 posts | 8 followers
FollowAlibaba Cloud Service Mesh (ASM) is a fully managed service mesh platform that is compatible with Istio.
Learn MoreAlibaba Cloud Function Compute is a fully-managed event-driven compute service. It allows you to focus on writing and uploading code without the need to manage infrastructure such as servers.
Learn MoreProvides a control plane to allow users to manage Kubernetes clusters that run based on different infrastructure resources
Learn MoreAccelerate and secure the development, deployment, and management of containerized applications cost-effectively.
Learn MoreMore Posts by Xi Ning Wang(王夕宁)