All Products
Search
Document Center

Elastic Container Instance:Create a pod by specifying a compute category

Last Updated:Apr 01, 2026

Instead of enumerating specific Elastic Compute Service (ECS) instance types, you can specify vCPU and memory requirements and let Elastic Container Instance (ECI) select the underlying architecture automatically. The compute category feature lets you express a preference for cost or performance in that selection.

Two categories are available:

  • Economy — lower vCPU unit price than general, supports 0.25–8 vCPUs. Best for lightweight, batch, or cost-sensitive workloads.

  • General — same unit price as instances created without a compute category, supports 1–64 vCPUs. Delivers higher performance for the same vCPU and memory specs.

Important

Both compute categories are in public preview.

The default temporary storage for both categories is 30 GiB.

Choose a compute category

GoalCategory
Reduce cost for simple or non-critical workloadseconomy
Maximize performance for production workloadsgeneral
Improve availability (tolerate minor performance variation)Specify both: general,economy

When you specify multiple categories, the system tries each combination in order (spec priority first, then category). This lets the system fall back to economy if general resources are unavailable — keeping the pod running at the cost of a minor performance trade-off.

Specifications

Economy

Supported in all regions where ECI is available

vCPUMemory (GiB)Baseline bandwidth (bidirectional, Gbit/s)
0.250.5, 10.08
0.51, 20.08
12, 4, 80.08
21, 2, 4, 8, 160.2
42, 4, 8, 16, 320.4
84, 8, 16, 32, 640.8

Supported only in some regions

Important
  • The following specs are only available in: China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Chengdu), and Singapore.

  • These specs cannot be used to create preemptible instances.

vCPUMemory (GiB)Baseline bandwidth (bidirectional, Gbit/s)
26, 10, 12, 140.2
46, 10, 12, 14, 18, 20, 22, 24, 26, 28, 300.4
66, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 480.8
810, 12, 14, 18, 20, 22, 24, 26, 28, 30, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 620.8

General

Supported in all regions where ECI is available

vCPUMemory (GiB)Baseline bandwidth (bidirectional, Gbit/s)
12, 4, 81
21, 2, 4, 8, 161
42, 4, 8, 16, 321.5
84, 8, 16, 32, 642
1212, 24, 48, 962.5
1616, 32, 64, 1283
2424, 48, 96, 1924.5
3232, 64, 128, 2566
5296, 192, 38412.5
64128, 256, 51220

Supported only in some regions

Important
  • The following specs are only available in: China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Chengdu), and Singapore.

  • These specs cannot be used to create preemptible instances.

vCPUMemory (GiB)Baseline bandwidth (bidirectional, Gbit/s)
26, 10, 12, 141
46, 10, 12, 14, 18, 20, 22, 24, 26, 28, 301.5
66, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 481.5
810, 12, 14, 18, 20, 22, 24, 26, 28, 30, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 622.5

Billing

Important

Both compute categories are in public preview.

The economy category has a lower vCPU unit price than the general category. Memory pricing is the same for both.

CategoryResourceUnit price
EconomyvCPUUSD 0.00000424/vCPU-second (USD 0.015264/vCPU-hour)
EconomyMemoryUSD 0.00000096/GiB-second (USD 0.003456/GiB-hour)
GeneralvCPUUSD 0.0000077/vCPU-second (USD 0.02772/vCPU-hour)
GeneralMemoryUSD 0.00000096/GiB-second (USD 0.003456/GiB-hour)

After the pod is created, run kubectl describe pod to confirm the actual compute category used. The k8s.aliyun.com/eci-instance-compute-category response annotation shows the result — billing is based on that category's unit prices.

Limitations

  • vCPU/memory specs required. This feature only works when creating elastic container instances by specifying vCPU and memory. If you specify ECS instance types, they take precedence and the compute category is ignored.

  • Preemptible pods not supported. Setting both a preemptible annotation and a compute category annotation returns error FeatureBasedConstraintConflict.

  • Arm-based pods not supported. Scheduling a pod on an Arm-based virtual node with an economy compute category annotation returns error FeatureBasedConstraintConflict.

  • Incompatible features. Cannot be used together with:

    • Specify or exclude ECS instance families

    • Specify or exclude specific generations of ECS instance families

Configure the compute category

Step 1: Specify vCPU and memory

Before setting a compute category, specify the pod's vCPU and memory using one of these methods:

MethodHowNotes
Per-container limits (recommended)Set resources.limits.cpu and resources.limits.memory for each containerECI uses limits to determine the instance spec. Using limits gives you explicit control over the instance size selected.
Pod-level annotationAdd k8s.aliyun.com/eci-use-specs to the pod's metadataSpecifies the total vCPU and memory for the pod directly, bypassing per-container aggregation.
If none of limits, requests, or k8s.aliyun.com/eci-use-specs are set, or if all three are set simultaneously, see Configuration description for how the system resolves the spec.

Step 2: Set the compute category

Add the k8s.aliyun.com/eci-compute-category annotation to the pod's metadata section.

  • Valid values: economy, general

  • To specify a fallback order, use a comma-separated list: general,economy

Important
  • Add annotations to the pod's metadata section. For a Deployment, this is spec.template.metadata.

  • Annotations take effect only at pod creation. Adding or modifying annotations on an existing pod has no effect.

How spec selection works

When both vCPU/memory specs and a compute category are configured, ECI determines the final instance using these rules:

ConfigurationResult
Compute category specified, no vCPU/memoryCreates an instance with 2 vCPUs and 4 GiB of memory using the specified category
vCPU/memory + compute category specified, combination is a valid ECI specCreates the instance as specified
vCPUs < 1 with general categorySystem auto-adjusts vCPUs to 1 (minimum for general)
vCPUs > 8 with economy categoryInvalid — system cannot auto-adjust; returns an error
vCPUs within the category's range but not an exact ECI specSystem rounds up to the nearest supported spec (greater than or equal to the requested values). Example: 7 vCPU / 13 GiB + general is adjusted to 8 vCPU / 16 GiB
Multiple specs or categories specifiedInstance specs take priority over categories. The system tries combinations in the order specified.

Multiple specs and categories

When you specify multiple values for both, the system iterates through all combinations by spec first, then category. Invalid combinations (for example, 16 vCPU + economy) are automatically skipped.

Example: k8s.aliyun.com/eci-use-specs: "4-8Gi,8-16Gi,16-32Gi" and k8s.aliyun.com/eci-compute-category: "general,economy"

The system tries in this order:

  1. 4 vCPU / 8 GiB, general

  2. 4 vCPU / 8 GiB, economy

  3. 8 vCPU / 16 GiB, general

  4. 8 vCPU / 16 GiB, economy

  5. 16 vCPU / 32 GiB, general

  6. 16 vCPU / 32 GiB, economy *(invalid — auto-skipped)*

Important

When a requested spec doesn't exactly match any supported ECI spec, the system considers all specified categories and rounds up to the nearest valid spec. If that rounded spec is incompatible with a given category, that category is excluded from the selection for this spec. Example: 0.5 vCPU / 1.9 GiB + general,economy — the system rounds up to 0.5 vCPU / 2 GiB. Because 0.5 vCPU is not supported by general, only economy is used for this spec.

Configuration examples

Example 1: Economy category with per-container limits

Use limits on each container and set the compute category to economy. The pod's total vCPU and memory are summed across containers.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: test
  labels:
    app: test
spec:
  replicas: 2
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      name: test
      labels:
        app: nginx
        alibabacloud.com/eci: "true"
      annotations:
        k8s.aliyun.com/eci-compute-category: "economy"
    spec:
      containers:
      - name: nginx
        image: registry.cn-shanghai.aliyuncs.com/eci_open/nginx:1.14.2
        ports:
        - containerPort: 80
        resources:
          limits:
            cpu: "500m"       # 0.5 vCPU
            memory: "1024Mi"  # 1 GiB
      - name: busybox
        image: registry.cn-shanghai.aliyuncs.com/eci_open/busybox:1.30
        command: ["sleep"]
        args: ["999999"]
        resources:
          limits:
            cpu: "1000m"      # 1 vCPU
            memory: "2048Mi"  # 2 GiB

Example 2: General with economy fallback

Set general,economy to prefer high performance but fall back to economy if general resources are unavailable. This improves availability without requiring a fixed compute category.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: test
  labels:
    app: test
spec:
  replicas: 2
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      name: test
      labels:
        app: nginx
        alibabacloud.com/eci: "true"
      annotations:
        k8s.aliyun.com/eci-compute-category: "general,economy"  # Prefer general; fall back to economy
    spec:
      containers:
      - name: nginx
        image: registry.cn-shanghai.aliyuncs.com/eci_open/nginx:1.14.2
        ports:
        - containerPort: 80
        resources:
          limits:
            cpu: "2000m"      # 2 vCPUs
            memory: "4096Mi"  # 4 GiB
      - name: busybox
        image: registry.cn-shanghai.aliyuncs.com/eci_open/busybox:1.30
        command: ["sleep"]
        args: ["999999"]
        resources:
          limits:
            cpu: "2000m"      # 2 vCPUs
            memory: "4096Mi"  # 4 GiB

Example 3: Multiple specs with economy category

Use k8s.aliyun.com/eci-use-specs to specify multiple pod-level specs with a fallback order, combined with a single compute category.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: test
  labels:
    app: test
spec:
  replicas: 2
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      name: test
      labels:
        app: nginx
        alibabacloud.com/eci: "true"
      annotations:
        k8s.aliyun.com/eci-use-specs: "2-4Gi,4-8Gi"    # Try 2 vCPU/4 GiB first, then 4 vCPU/8 GiB
        k8s.aliyun.com/eci-compute-category: "economy"
    spec:
      containers:
      - name: nginx
        image: registry.cn-shanghai.aliyuncs.com/eci_open/nginx:1.14.2
        ports:
        - containerPort: 80