All Products
Search
Document Center

Elastic Container Instance:Create pods by specifying multiple specifications

Last Updated:Jan 22, 2024

When you create a large number of elastic container instances (pods), the resources that you can use may be insufficient. In this case, we recommend that you specify multiple specifications. The system tries to create the pods based on the sequence of the specified specifications. This improves the creation success rate.

Background Information

If you specify multiple specifications when you create an elastic container instance, the system tries to use the specifications in sequence. This improves the creation success rate.

Note
  • During the retry, the instance remains in the Pending state.

  • The multi-specification mode is effective at the instance level and only affects the creation policy of a single instance.

  • You can also specify multiple zones when you use the multi-specification mode. This further improves the creation success rate.

Supported specifications

vCPU and memory specifications supported by Elastic Container Instance

  • Specifications supported in all regions where Elastic Container Instance is available

    Nubmer of vCPUs

    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

    56

    224

    10

    64

    128, 256, and 512

    20

  • Specifications supported in only some regions

    Important
    • The specifications contained in the following table are supported only in some regions. When you create an elastic container instance that has one of the following specifications, make sure that the corresponding specifications are supported in the specified region and zone. Otherwise, the instance cannot be created because no resources exist in the region and zone.

      The regions that support the specifications contained in the following table include: China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Chengdu), and Singapore.

    • You cannot specify the specifications in the following table to create preemptible instances.

    Number of vCPUs

    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 families supported by Elastic Container Instance

  • x86-based enterprise-level computing instance families

    x86-based ECS instance types are based on the x86 architecture. Each vCPU corresponds to a hyper-thread of a processor core. They deliver stable performance and are suitable for scenarios such as enterprise-level applications, database systems, video encoding and decoding, and data analysis.

    Category

    x86-based enterprise-level instance family

    General-purpose instance families

    g7a, g7, g6e, g6a, g6, g5, sn2ne, and sn2

    Compute-optimized instance families

    c7a, c7, c6e, c6a, c6, c5, sn1ne, and sn1

    Memory optimized instance families

    r7a, r7, r6e, r6a, r6, r5, se1ne, and se1

    Unified-computing instance families

    u1

    Compute-intensive instance families

    ic5

    Instance families with high clock speeds

    • hfg7, hfg6, and hfg5

    • hfc7, hfc6, and hfc5

    • hfr7

    Big data instance families

    d1 and d1ne

    Instance families with local SSDs

    i2 and i2g

Enterprise-level heterogeneous computing instance families

GPU-accelerated ECS instance types contain GPUs and are suitable for scenarios such as deep learning and image processing. GPU-related Docker images can be directly run on a GPU-accelerated elastic container instance. An NVIDIA GPU driver is pre-installed in the instance. The supported driver and CUDA versions vary with GPU types.

Category

GPU-accelerated instance family

Driver and CUDA versions

vGPU-accelerated instance families

sgn7i-vws

NVIDIA 470.141.03 and CUDA 11.4

vgn7i-vws

vgn6i-vws

GPU-accelerated compute-optimized instance families

gn7e

  • NVIDIA 470.82.01 and CUDA 11.4 (default)

  • NVIDIA 525.85.12 and CUDA 12.0

gn7i

gn7s

gn7

gn6v

gn6e

gn6i

gn5i

gn5

ARM-based enterprise-level computing instance families

ARM-based ECS instance types are based on the ARM architecture. Each vCPU corresponds to a physical core of a processor. They deliver stable performance and provide exclusive resources. They are suitable for scenarios such as containers, microservices, website and application servers, high-performance computing, and CPU-based machine learning.

Category

ARM-based instance family

General-purpose instance families

g8y

Compute-optimized instance families

c8y

Memory optimized instance families

r8y

x86-based shared computing instance families

Shared ECS instance types are suitable for small and medium-sized websites and individuals. Compared with enterprise-level ECS instance types, shared ECS instance types emphasize the sharing of resource performance to maximize resource utilization. In this case, the stability of computing performance cannot be ensured, but the cost is reduced.

Category

x86-based shared instance family

Burstable instance families

t6 and t5

Economy instance family

e

Important

If you use burstable instance families, take note of the following items:

  • Burstable instances use CPU credits to maintain computing performance and are suitable for scenarios in which CPU utilization is typically low but experiences occasional bursts. For more information about burstable instances, see Overview.

  • You can view the CPU credits of burstable instances in CloudMonitor. For more information, see Use CloudMonitor to monitor elastic container instances.

  • You cannot enable the unlimited mode for burstable instances.

For more information about ECS instance types, see the following topics:

Configuration description

You can add the k8s.aliyun.com/eci-use-specs annotation to the metadata of the configuration file of a pod to specify specifications for the instance.

  • When you specify multiple specifications, you can specify vCPU and memory specifications or ECS instance types. You can also specify both of them.

    Important

    After the pod is created, you can view the YAML file details of the pod and check the specifications that are actually used by the pod in the k8s.aliyun.com/eci-instance-spec field. If the pod uses an ECS instance type, you are charged based on the ECS instance type. If the pod uses vCPU and memory specifications, you are charged based on the number of vCPUs and memory size.

  • You must specify specifications in a priority order. Up to five specifications can be specified.

  • If you specify GPU-accelerated ECS instance types, ECS instance types that use local disks, or ARM-based ECS instance types when you create a pod, you must configure additional parameters. Therefore, you cannot specify one of the preceding ECS instance types together with other specifications to create a pod.

Sample configuration:

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  # Enter the specifications based on your requirements.
    spec:
      containers:
      - name: nginx
        image: registry.cn-shanghai.aliyuncs.com/eci_open/nginx:1.14.2
        ports:
        - containerPort: 80