In some scenarios, you may have special requirements on specifications, such as GPUs, enhanced network capabilities, high clock speeds, and local disks. To meet the requirements, you can create an Elastic Container Instance (ECI) of the specified Elastic Compute Service (ECS) instance type. The instance types of ECIs are defined as the same as the ECS instance types.

Supported ECS instance types

Notice In this mode, the unit price of ECIs is the same as that of the pay-as-you-go ECS instances of the same instance type. ECIs are billed by second. For more information, see ECS pricing.

You can check the ECS instance types supported in each region and zone on the ECS Instance Types Available for Each Region page.

Currently, the following instance families are supported. For more information, see Instance families.

  • General purpose instance families that offer a CPU-to-memory ratio of 1:4: g6, g5, and sn2ne with enhanced network performance

  • Compute optimized instance families that offer a CPU-to-memory ratio of 1:2: c6, c5, and sn1ne with enhanced network performance

  • Memory optimized instance families that offer a CPU-to-memory ratio of 1:8: r6, r5, and se1ne with enhanced network performance.

  • Compute intensive instance family that offers a CPU-to-memory ratio of 1:1: ic5

  • Compute optimized instance families with high clock speeds that offer a CPU-to-memory ratio of 1:2: hfc6 and hfc5

  • General purpose instance families with high clock speeds that offer a CPU-to-memory ratio of 1:4: hfg6 and hfg5

  • Compute optimized instance families with GPU capabilities: gn6i, gn6v, gn5i, and gn5 that supports local storage

  • Burstable instance families: t6 and t5

Kubernetes mode

Alibaba Cloud Container Service for Kubernetes supports creating an ECI of the specified ECS instance type.

  1. Log on to the Container Service console. In this example, choose Applications > Deployments in the left-side navigation pane.
  2. In the upper-right corner of the Deployments page, click Create from Template.
  3. Add annotations in the pod template.
    Notice You need to add annotations in the metadata parameter for the pod.
apiVersion: apps/v1beta2 # For versions earlier than 1.8.0, use apps/v1beta1.
kind: Deployment
  name: nginx-deployment-basic
    app: nginx
  replicas: 2
      app: nginx
        app: nginx
      annotations: : "ecs.c5.large"  # Replace the ECS instance type as needed.
    #  nodeSelector:
    #    env: test-team
      - name: nginx
        image: nginx:1.7.9 # Replace it with your image name, in the format of <image_name:tags>.
        - containerPort: 80

View the created pod

API mode

When you call the CreateContainerGroup operation to create an ECI, you can specify multiple instance types through the InstanceType parameter. For more information about other parameters, see CreateContainerGroup.

The following table describes the parameter that you need to set in the request.

Parameter Type Required Example Description
InstanceType String No ecs.c5.xlarge The instance type of the ECI to be created. You can specify up to five instance types separated with commas (,). Example: ecs.c5.xlarge,ecs.g5.xlarge.