All Products
Search
Document Center

Elastic Container Instance:Create an Arm-based instance

Last Updated:Jun 07, 2024

This topic describes how to create an Arm-based elastic container instance.

Description of the ECS 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

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

Precautions

You are charged for an Arm-based elastic container instance based on the corresponding Arm-based ECS instance type instead of the vCPU and memory specifications.

Important

After the elastic container instance is created, you can call the DescribeContainerGroups API operation to query the details of the instance. The InstanceType response parameter indicates the Arm-based ECS instance type on which the elastic container instance is built.

Configuration description

API mode

If you call the CreateContainerGroup API operation to create an elastic container instance, you can use one of the following methods to specify the Arm structure of the instance:

  • Method 1: Use the InstanceType parameter to specify Arm-based ECS instance types.

  • Method 2: Specify the vCPU and memory specifications and specify the CPU architecture by using the CpuArchitecture parameter. The system automatically selects a supported Arm-based ECS instance type that meets the vCPU and memory requirements.

    You can use one of the following methods to specify the vCPU and memory specifications:

    • Specify the vCPU and memory specifications of only containers. The system automatically aggregates the vCPU and memory specifications of containers to the vCPU and memory specifications of the instance.

    • Specify the vCPU and memory specifications of the instance, and then specify the vCPU and memory specifications of each container.

    • Use the InstanceType parameter to specify the vCPU and memory specifications of the elastic container instance.

The following table describes the parameters that you can use to specify the Arm architecture of the instance. For more information, see CreateContainerGroup.

Parameter

Type

Example

Description

Cpu

number

2.0

The number of vCPUs that you want to allocate to the elastic container instance.

Memory

number

4.0

The memory size that you want to allocate to the elastic container instance. Unit: GiB.

Container.N.Cpu

number

0.5

The number of vCPUs that you want to allocate to container N.

Container.N.Memory

number

1.0

The memory size of container N. Unit: GiB.

InstanceType

String

2-4Gi

The specifications for the instance.

  • You can specify up to five specifications at a time. Separate multiple specifications with commas (,).

  • You can specify vCPU and memory specifications. You can also specify ECS types.

CpuArchitecture

String

ARM64

The CPU architecture of the instance. Default value: AMD64. Valid values:

  • AMD64

  • ARM64

Sample configurations:

  • Example 1: Specify Arm-based ECS instance types

    ContainerGroupName=test-arm
    # Specify multiple Arm-based ECS instance types
    InstanceType=ecs.c8y.large,ecs.g8y.large
    # Create an elastic IP address (EIP) and associate the EIP with the instance to pull images over the Internet.
    AutoCreateEip=true
    # Configure containers to use an Arm-based container image.
    Container.1.Name=centos
    Container.1.Image=arm64v8/centos:7.9.2009
    Container.1.command.1=sleep
    Container.1.Arg.1=999999
  • Example 2: Specify vCPU and memory specifications and a CPU architecture

    ContainerGroupName=test-arm
    # Specify the vCPU and memory specifications for the instance.
    Cpu=2.0
    Memory=4.0
    # Specify the CPU architecture.
    CpuArchitecture=ARM64
    # Create an EIP and associate the EIP with the instance to pull images over the Internet.
    AutoCreateEip=true
    # Configure containers to use an Arm-based container image.
    Container.1.Name=centos
    Container.1.Image=arm64v8/centos:7.9.2009
    Container.1.command.1=sleep
    Container.1.Arg.1=999999

Console mode

When you create an Arm-based instance in the Elastic Container Instance console, if the selected region and zone support the Arm architecture, you can click the Specify Instance Type tab in the Container Group Configurations section and select Arm-based ECS instance types.

指定ARM.png