When resources in a zone are insufficient, pods may fail to be created. Specifying multiple specifications lets the system try each specification in sequence until a pod is created successfully, improving the overall creation success rate.
How it works
Add the k8s.aliyun.com/eci-use-specs annotation to a pod's metadata. When you submit a pod creation request, the system attempts the specifications in the order you listed them. If the first specification has no available resources, it moves to the next one automatically.
All specifications in the list are tried at the instance level: the retry affects only that single pod's creation policy, not other pods. During the retry process, the pod stays in the Pending state.
What happens if all specifications are exhausted?
If no resources are available for any of the specified specifications, the pod remains Pending. To reduce the risk of this outcome:
Combine multi-specification mode with multiple zones to further improve the creation success rate.
Supported specification types
You can specify vCPU and memory combinations, Elastic Compute Service (ECS) instance types, or a mix of both in the same annotation.
vCPU and memory specifications
The following vCPU and memory combinations are available in all regions where Elastic Container Instance (ECI) is available.
| vCPU | Memory (GiB) | Bandwidth (bidirectional, Gbit/s, theoretical upper limit) |
|---|---|---|
| 0.25 | 0.5 and 1 | 0.08 |
| 0.5 | 1 and 2 | 0.08 |
| 1 | 2, 4, and 8 | 0.1 |
| 2 | 1, 2, 4, 8, and 16 | 1 |
| 4 | 2, 4, 8, 16, and 32 | 1.5 |
| 8 | 4, 8, 16, 32, and 64 | 2 |
| 12 | 12, 24, 48, and 96 | 2.5 |
| 16 | 16, 32, 64, and 128 | 3 |
| 24 | 24, 48, 96, and 192 | 4.5 |
| 32 | 32, 64, 128, and 256 | 6 |
| 52 | 96, 192, and 384 | 12.5 |
| 64 | 128, 256, and 512 | 20 |
The following combinations are available only in specific regions and cannot be used to create preemptible instances.
Verify that the combination you select is supported in the target region and zone before submitting a request. If it is not supported, the pod cannot be created due to unavailable resources.
Supported regions: China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Chengdu), and Singapore.
| vCPU | Memory (GiB) | Bandwidth (bidirectional, Gbit/s, theoretical upper limit) |
|---|---|---|
| 2 | 6, 10, 12, and 14 | 1 |
| 4 | 6, 10, 12, 14, 18, 20, 22, 24, 26, 28, and 30 | 1.5 |
| 6 | 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, and 48 | 1.5 |
| 8 | 10, 12, 14, 18, 20, 22, 24, 26, 28, 30, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, and 62 | 2.5 |
ECS instance types
ECI supports the following ECS instance families.
x86-based enterprise-level instance families
x86-based instance types deliver stable performance and are suitable for enterprise applications, database systems, video encoding and decoding, and data analysis. Each vCPU corresponds to a hyper-thread of a processor core.
| Category | Instance families |
|---|---|
| General-purpose | g8a, g8i, g7a, g7, g6e, g6a, g6, g5, sn2, and sn2ne |
| Compute-optimized | c8a, c8i, c7a, c7, c6e, c6a, c6, c5, sn1, and sn1ne |
| Memory optimized | r8a, r8i, r7a, r7, r6e, r6a, r6, r5, se1ne, and se1 |
| General compute | u1 |
| Compute-intensive | ic5 |
| High clock speeds | hfg8i, hfg7, hfg6, hfg5, hfc8i, hfc7, hfc6, hfc5, hfr8i, and hfr7 |
| Big data | d1 and d1ne |
| Local SSDs | i2 and i2g |
GPU-accelerated instance families
GPU-accelerated instance types include GPUs and are suitable for deep learning and image processing. A NVIDIA GPU driver is pre-installed. Container images with GPU support run directly on these instances without additional driver configuration.
The gn8ia and gn8is instance families are available only in specific regions outside the Chinese mainland. Contact Alibaba Cloud sales to enable access.
| Category | Instance families | Driver and CUDA versions |
|---|---|---|
| vGPU-accelerated | sgn7i-vws, vgn7i-vws, and vgn6i-vws | NVIDIA 470.161.03 and CUDA 11.4 |
| GPU-accelerated compute-optimized | gn7e | NVIDIA 470.82.01 and CUDA 11.4 (default); NVIDIA 535.161.08 and CUDA 12.2 |
| GPU-accelerated compute-optimized | gn7i, gn7s, gn7, gn6v, gn6e, gn6i, gn5i, and gn5 | NVIDIA 470.82.01 and CUDA 11.4 (default); NVIDIA 535.161.08 and CUDA 12.2 |
| GPU-accelerated compute-optimized | gn8ia and gn8is | NVIDIA 535.161.08 and CUDA 12.2 |
x86-based shared instance families
Shared instance types are suitable for small and medium-sized websites and individual workloads. They share physical resources to maximize utilization, which means computing performance is not guaranteed.
| Category | Instance families |
|---|---|
| Economy | e |
For a full description of each instance family and regional availability, see Overview of instance families and ECS instance types available for each region.
Configure multi-specification pod creation
Add the k8s.aliyun.com/eci-use-specs annotation to the pod metadata. Specify up to five specifications in priority order, separated by commas.
| Parameter | Description |
|---|---|
k8s.aliyun.com/eci-use-specs | Comma-separated list of specifications in priority order. Accepts vCPU-memory combinations (for example, 2-4Gi), ECS instance types (for example, ecs.c5.large), or a mix of both. Maximum five entries. |
Limitations:
For GPU-accelerated, local disk, or Arm-based instances, you can only specify corresponding specifications. Specifications that do not support the target hardware type cannot be specified.
Preemptible instances cannot use the region-limited vCPU and memory combinations listed in the table above.
The following example creates a Deployment with two replicas. Each pod tries 2-4Gi, then ecs.c5.large, then ecs.c6.large if the previous specification has no available resources.
apiVersion: apps/v1
kind: Deployment
metadata:
name: test
labels:
app: test
spec:
replicas: 2
selector:
matchLabels:
app: nginx
template:
metadata:
name: nginx-test
labels:
app: nginx
alibabacloud.com/eci: "true"
annotations:
k8s.aliyun.com/eci-use-specs: 2-4Gi,ecs.c5.large,ecs.c6.large # Specifications in priority order. Replace with actual values.
spec:
containers:
- name: nginx
image: registry.cn-shanghai.aliyuncs.com/eci_open/nginx:1.14.2
ports:
- containerPort: 80Verify the specification used
After the pod is created, check the k8s.aliyun.com/eci-instance-spec field in the pod's YAML to see which specification was actually used.
Billing
The billing model depends on the specification type used:
ECS instance type: billed based on the ECS instance type.
vCPU and memory combination: billed based on the number of vCPUs and the memory size.
For pricing details, see Pricing of ECS instance types.
What's next
Specify multiple zones to create pods — combine zone diversity with multi-specification mode to further improve the creation success rate.
Overview of instance families — compare instance family characteristics to choose the right types for your workload.