All Products
Search
Document Center

Elastic Container Instance:ECS instance types of the ARM architecture

Last Updated:Nov 06, 2023

This topic describes how to specify Elastic Compute Service (ECS) instance types of the ARM architecture to create an Elastic Container Instance (ECI) pod. The pod runs on virtual nodes of the ARM architecture.

Supported instance type 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:

Configurations

In addition to adding the k8s.aliyun.com/eci-use-specs annotation to the pod metadata to specify ECS instance types of the ARM architecture, you must set nodeSelector to kubernetes.io/arch: arm64 to adapt to Kubernetes-based scheduling.

Example:

  1. Make sure that virtual nodes of the ARM architecture exist in the cluster.

    kubectl get node

    If the returned node name contains a linux-arm64 suffix, the node is a virtual node of the ARM architecture.

    ARM节点
    Note

    For more information about how to add an ARM-based virtual node to a cluster, see Schedule pods to an ARM-based virtual node.

  2. Run the following command to specify ECS instance types of the ARM architecture.

    kubectl create -f arm-test.yaml

    The following code provides an example in YAML format.

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: test
      labels:
        app: test
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: nginx
      template:
        metadata:
          name: nginx-test
          labels:
            app: nginx
            alibabacloud.com/eci: "true" 
          annotations:
            k8s.aliyun.com/eci-use-specs: "ecs.c8y.large,ecs.g8y.large" # Specify a maximum of five ECS instance types of the ARM architecture at a time. 
        spec:
          containers:
          - name: nginx
            image: arm64v8/centos:7.9.2009 # Use an ARM-based image. 
            command: ["sleep"]
            args: ["999999"]
          nodeSelector:
            kubernetes.io/arch: arm64 # Schedule to ARM-based virtual nodes.