All Products
Search
Document Center

Container Service for Kubernetes:Create an elastic container instance from a specified ECS instance type

Last Updated:Apr 15, 2024

You may need to meet custom needs in some scenarios, such as GPU capabilities, enhanced network capabilities, high clock speed, and local storage. You can create an elastic container instance from a specified Elastic Compute Service (ECS) instance type. This topic describes how to create an elastic container instance from a specified ECS instance type.

Descriptions of ECS instance types

For more information about Elastic Container Instance-specific ECS instance types, see the descriptions of ECS instance types. The unit price of an elastic container instance is the same as that of the corresponding ECS instance. Both are billed on a per-second basis. For more information, see ECS price calculator.

You can check the ECS instance types supported in each region and zone in Overview of ECS instance types available to purchase in each region and zone. The following ECS instance families are supported:

ECS instance types of the x86 architecture

ECS instance type families of the x86 architecture fall into two categories based on whether they are suitable for enterprise scenarios: enterprise-grade families and shared families.

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

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

Compute-optimized instance families

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

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

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 families

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.

GPU-accelerated ECS instance types

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. A 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

ECS instance types that use a local disk

Local disks reside on the same physical server as the elastic container instance to which the disks are attached. Local disks are cost-effective and provide high random IOPS, high throughput, and low latency. Local disks reside on a single physical server, which increases the risks of single points of failure (SPOFs). For more information, see Local disks.

Important

Local disks reside on a single physical server, which increases the risks of SPOFs. The durability of data stored on local disks is determined by the reliability of the associated physical server. For more information, see Limits.

The following ECS instance families with local disks can be used to create elastic container instances:

  • d1, big data instance family

  • d1ne, big data instance family with enhanced network performance

  • i2, instance family with local SSDs

  • i2g, instance family with local SSDs

  • gn5, GPU-accelerated compute-optimized instance family

Note

gn5 is a GPU-accelerated instance family. If you select this instance family, you must specify GPU-related parameters in addition to local disk-related parameters.

ECS instance types of the ARM architecture

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

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

Examples

You can set the k8s.aliyun.com/eci-use-specs annotation in the pod definition to specify multiple ECS instance types that are separated by commas (,).

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
  labels:
    app: nginx
spec:
  replicas: 2
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
      annotations:
        k8s.aliyun.com/eci-use-specs : "ecs.c5.large"  #Replace the value with the ECS instance types as needed. 
    spec:
      containers:
      - name: nginx
        image: nginx:1.7.9
        ports:
        - containerPort: 80