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
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:
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.NoteFor more information about how to add an ARM-based virtual node to a cluster, see Schedule pods to an ARM-based virtual node.
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.