ACK schedules workloads to x86-based worker nodes by default. In a mixed cluster that contains both ARM-based and x86-based nodes, configure Kubernetes scheduling to route ARM workloads exclusively to ARM-based nodes, or to prefer ARM-based nodes for multi-arch workloads.
Prerequisites
Before you begin, ensure that you have:
-
A cluster running Kubernetes 1.20 or later with Alibaba Cloud Linux 3 as the operating system. For more information, see Create a cluster and Upgrade clusters.
-
The kube-scheduler component installed. For more information, see Manage components.
Only the Core Components, Logs and Monitoring, Storage, and Networking components on the Add-ons page support ARM-based node pools. Components listed on the Marketplace page of the ACK console cannot be deployed in ARM-based node pools.
Before scheduling ARM workloads
Keep the following constraints in mind before adding ARM-based nodes to your scheduling configuration:
-
ARM images only: Applications scheduled to ARM-based nodes must use container images compiled for the ARM architecture. Scheduling an x86-only image to an ARM node causes the Pod to fail to start.
-
Multi-arch images: If your application image supports both ARM and x86, use
preferredDuringSchedulingIgnoredDuringExecutionto prefer ARM nodes while allowing fallback to x86 nodes when ARM capacity is unavailable.
Protect ARM nodes with a taint
Add the kubernetes.io/arch=arm64:NoSchedule taint to ARM-based nodes to prevent workloads that do not support the ARM architecture from being accidentally scheduled there.
Kubernetes provides three taint effects:
| Effect | Behavior |
|---|---|
NoSchedule |
New Pods without a matching toleration are not scheduled on the node. Pods already running on the node are not evicted. |
NoExecute |
New Pods without a matching toleration are not scheduled on the node. Existing Pods without a matching toleration are evicted. |
PreferNoSchedule |
The scheduler avoids placing Pods without a matching toleration on the node, but does not strictly prevent it. |
Use NoSchedule for ARM-based nodes. This blocks new incompatible Pods while leaving any existing Pods undisturbed.
Toleration behavior by Kubernetes version:
-
Kubernetes < 1.24: When using
nodeSelectorornodeAffinityto target ARM nodes, manually add a toleration forkubernetes.io/arch=arm64:NoSchedulein the Pod spec. -
Kubernetes >= 1.24: The scheduler automatically tolerates the
kubernetes.io/arch=arm64:NoScheduletaint when a Pod targets ARM nodes — no manual toleration required.
Billing
For ECS instance types that use the ARM architecture and their pricing, see:
Create an ARM-based node pool
When you create a node pool, in the Instance Type section, set Architecture to Arm, configure other parameters as needed, and then complete the node pool creation. For more information about how to create a node pool, see Create and manage node pools.
Go to Instance Types Available for Each Region to view the instance types available in each region.
Add ARM-based nodes to your cluster either when creating a new cluster or by adding a node pool to an existing cluster.
Create an ARM-based node pool when creating a cluster
When you configure a node pool during cluster creation, in the Instance Type section, set Architecture to Arm, select an instance type from the g8m general-purpose instance family, configure other parameters, and then complete the cluster creation. For more information about how to create a cluster, see Create an ACK managed cluster.
Go to Instance Types Available for Each Region to view the instance types available in each region.
When configuring the node pool during cluster creation, set Architecture to Arm in the Instance Type section and select g8m general-purpose instances. Configure other parameters based on your requirements.
For more information, see Create an ACK managed cluster.
To view available ARM instance types by region, see ECS instance types available for each region.
Add an ARM-based node pool to an existing cluster
When creating a node pool, set Architecture to ARM in the Instance Type section. Configure other parameters based on your requirements.
For more information, see Create and manage a node pool.
To view available ARM instance types by region, see ECS instance types available for each region.
Schedule ARM-only workloads to ARM-based nodes
If your workloads use the ARM architecture exclusively and your cluster contains non-ARM nodes, route those workloads to ARM nodes. Pods scheduled to incompatible nodes fail to start.
All ARM-based nodes carry the kubernetes.io/arch=arm64 label automatically. Use either nodeSelector or nodeAffinity to target this label.
nodeSelector
Add the following field to the Pod spec to restrict scheduling to ARM-based nodes:
nodeSelector:
kubernetes.io/arch: arm64 # Schedule only to nodes with the arm64 label.
The following Deployment uses nodeSelector to schedule all Pods to ARM-based nodes:
apiVersion: apps/v1
kind: Deployment
metadata:
name: only-arm
spec:
selector:
matchLabels:
app: nginx
replicas: 1
template:
metadata:
labels:
app: nginx
spec:
nodeSelector:
kubernetes.io/arch: arm64 # Schedule only to nodes with the arm64 label.
containers:
- name: nginx
image: nginx
Verify: After applying the manifest, run the following command and confirm that the Pod is running on an ARM-based node:
kubectl get pods -o wide
Expected output (the NODE column shows an ARM-based node name):
NAME READY STATUS RESTARTS AGE NODE
only-arm-xxxxxxxxx-xxxxx 1/1 Running 0 30s <arm-node-name>
nodeAffinity
Use nodeAffinity with requiredDuringSchedulingIgnoredDuringExecution to enforce ARM-only scheduling. The scheduler tolerates the kubernetes.io/arch=arm64:NoSchedule taint automatically when this constraint is present.
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- arm64
The following Deployment uses nodeAffinity to schedule all Pods to ARM-based nodes:
apiVersion: apps/v1
kind: Deployment
metadata:
name: only-arm
spec:
selector:
matchLabels:
app: nginx
replicas: 1
template:
metadata:
labels:
app: nginx
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- arm64
containers:
- name: nginx
image: nginx
Verify: After applying the manifest, run the following command and confirm that the Pod is running on an ARM-based node:
kubectl get pods -o wide
Expected output:
NAME READY STATUS RESTARTS AGE NODE
only-arm-xxxxxxxxx-xxxxx 1/1 Running 0 30s <arm-node-name>
Schedule multi-arch workloads to ARM-based nodes
If your application image supports both ARM and x86, configure preferredDuringSchedulingIgnoredDuringExecution to prefer ARM-based nodes. When ARM capacity is insufficient, Pods fall back to x86 nodes instead of becoming pending.
Prefer ARM-based nodes
The following Deployment prefers ARM-based nodes. Pods fall back to x86 nodes if no ARM capacity is available.
Prefer x86-based nodes
FAQ
Can I use ARM-based preemptible instances?
Yes. For more information, see Use preemptible instances.
What components are supported on ARM-based nodes?
Only the following component categories support the ARM architecture in ACK clusters:
-
Key components
-
Logging and monitoring components
-
Volume components
-
Network components
Components on the Marketplace page of the ACK console do not support the ARM architecture.
What's next
-
Create ARM-based virtual nodes and schedule workloads to them. For more information, see Schedule workloads to ARM-based virtual nodes.
-
Build multi-arch container images using Container Registry Enterprise Edition. For more information, see Build a multi-arch container image.
-
Run Spark jobs on ARM-based virtual nodes without managing cluster resources. For more information, see Run Spark jobs on ARM-based virtual nodes.