This topic describes how to create an Elastic Container Instance (ECI) that uses the Arm architecture.
Description of the ECS instance families
For more information about ECS instance types, see the following topics:
Precautions
Arm-based ECI instances are billed by the actual Arm instance type, not by vCPU and memory.
After you create an ECI instance, you can call the DescribeContainerGroups operation to query its details. The InstanceType parameter in the response indicates the actual ECS Arm instance type that the ECI instance uses.
Configuration description
API mode
When you call the CreateContainerGroup operation to create an ECI instance, you can use one of the following methods to create an Arm-based instance.
-
Method 1: Directly specify an ECS Arm instance type with the InstanceType parameter.
-
Method 2: Specify the vCPU and memory, and specify the CPU architecture with the CpuArchitecture parameter. The system automatically selects a supported ECS Arm 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.
|
CpuArchitecture | String | ARM64 | The CPU architecture of the instance. Default value: AMD64. Valid values:
|
Sample configurations:
-
Example 1: Specify ECS Arm instance types
ContainerGroupName=test-arm # Specify multiple ECS Arm instance types InstanceType=ecs.c8y.large,ecs.g8y.large # Create and associate an EIP to pull public images AutoCreateEip=true # Configure the container to use a container image for the Arm architecture 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 for the instance Cpu=2.0 Memory=4.0 # Specify the CPU architecture CpuArchitecture=ARM64 # Create and associate an EIP to pull public images AutoCreateEip=true # Configure the container to use a container image for the Arm architecture Container.1.Name=centos Container.1.Image=arm64v8/centos:7.9.2009 Container.1.command.1=sleep Container.1.Arg.1=999999
Console mode
In the Elastic Container Instance console, if the selected region and zone support Arm instance types, go to the Container Group Configurations section. Then, click the Specify Instance Type tab and select an ECS Arm instance type.
In the Architecture section, select the ARM Compute tab. From the instance type list, select an instance type, such as one from the general purpose g8y or compute optimized c8y families (Yitian processor).