This topic describes how to specify Arm-based Elastic Compute Service (ECS) instance types to create an Elastic Container Instance (ECI) pod. The pod runs on an Arm-based virtual node.
Prerequisites
Arm-based virtual nodes are created in the cluster. For information about how to create an Arm-based virtual node in a cluster, see Add an Arm-based virtual node.
Supported instance families
For more information about ECS instance families, see the following topics:
Configurations
In addition to adding the k8s.aliyun.com/eci-use-specs
annotation to the metadata in the configuration file of the pod to specify Arm-based ECS instance types, you must set nodeSelector to kubernetes.io/arch: arm64. This allows Kubernetes to schedule the pod to an Arm-based virtual node.
Example:
Make sure that Arm-based virtual nodes exist in the cluster.
kubectl get node
If the returned node name contains the
linux-arm64
suffix, the node is an Arm-based virtual node.NoteFor information about how to create an Arm-based virtual node in a cluster, see Add an ARM-based virtual node.
Specify Arm-based ECS instance types to create the pod.
kubectl create -f arm-test.yaml
Example of the arm-test.yaml file:
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" # Specifies Arm-based ECS instance types. You can specify a maximum of five instance types at a time. spec: containers: - name: nginx image: arm64v8/centos:7.9.2009 # Uses an Arm-based image. command: ["sleep"] args: ["999999"] nodeSelector: kubernetes.io/arch: arm64 # Schedules the pod to an Arm-based virtual node.