The system may exhaust instances of specified types or vSwitch IP resources in a zone when it attempts to create sufficient instances to handle traffic spikes or process a large number of jobs in parallel. As a result, you fail to create Elastic Container Instances (ECIs) in the zone. In this case, you can deploy a serverless Kubernetes (ASK) cluster across multiple zones to prevent resource shortage.
Background information
- An ECI distributes the requests for creating pods to all vSwitches. This balances the heavy load.
- If the zone of a vSwitch does not have sufficient resources to create the required pods, the system selects another vSwitch.
Procedure
FAQ
- How do I add nodes to an ASK cluster?
The concept of node is not applied to ASK clusters. To deploy ECIs in other zones, you can add a vSwitch of another zone to the eci-profile ConfigMap of the kube-system namespace. Separate vSwitches with commas (,).
- How do I deploy pods in different zones?
By default, pods are randomly scheduled to zones that have sufficient resources.
Match virtual kubelet. You can deploy ECIs of different instance types across zones by using the following three annotations:- k8s.aliyun.com/eci-schedule-strategy: " VSwitchOrdered"
- k8s.aliyun.com/eci-vswitch: "vsw-11111, vsw-22222"
- k8s.aliyun.com/eci-use-specs: "ecs.c5.4xlarge, ecs.c6.4xlarge,2-4Gi"
VSwitchOrdered
specifies that ECIs are created based on the vSwitch list in thek8s.aliyun.com/eci-vswitch
annotation. You can setk8s.aliyun.com/eci-schedule-strategy
toVSwitchRandom
orVSwitchOrdered
. When you create an ECI, the ECI is randomly scheduled to a zone or scheduled based on the vSwitch list specified by thek8s.aliyun.com/eci-vswitch
annotation.