By default, ACK clusters and schedule all workloads to x86 virtual nodes. If your cluster has both Arm and non-Arm virtual nodes, such as x86 virtual nodes, you can use native Kubernetes scheduling features. This allows you to schedule Arm-only workloads to Arm virtual nodes, or preferentially schedule multi-architecture images to Arm virtual nodes.
Prerequisites
-
Cluster:
An ACK cluster that runs Kubernetes 1.20 or later. For more information, see Create an ACK managed cluster and Manually upgrade a cluster.
NoteArm-based ECS instances are available only in specific regions and zones. Make sure your cluster is in a supported region. To check the supported regions and zones for Arm-based instances, see Overview of instance types available for purchase.
-
Component: The ack-virtual-node component, version 2.9.0 or later, is installed. For more information, see ACK Virtual Node.
Usage notes
If your cluster runs a Kubernetes version earlier than 1.24, you must add a toleration for the kubernetes.io/arch=arm64:NoSchedule taint when using nodeSelector or nodeAffinity to schedule applications to Arm nodes. For clusters that run Kubernetes 1.24 or later, the scheduler automatically recognizes the kubernetes.io/arch=arm64:NoSchedule taint on Arm nodes, and you do not need to declare the toleration.
Billing
For ECS instance types that use the ARM architecture and their pricing, see:
Step 1: Add Arm virtual nodes
Before you deploy a workload on the Arm architecture in your cluster, you must first create an Arm virtual node. You can create a virtual node that supports the Arm architecture by configuring an ECI Profile. You can edit the eci-profile ConfigMap by using one of the following methods. For more information about ECI Profile, see Configure an eci-profile.
Console
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, click the name of your cluster. In the left navigation pane, click .
-
From the Namespace drop-down list, select kube-system. Find eci-profile and click Edit in the Actions column. Set the value of the
enableLinuxArm64Nodekey totrue. Then, click OK.NoteIf all vSwitches in your cluster are in zones that do not support Arm-based instances, you must first create a vSwitch in a supported zone. After the vSwitch is created, add its ID to the
vSwitchIdsfield. For more information about how to create a vSwitch in a specific zone, see Create and manage vSwitches.After you complete the configuration, wait about 30 seconds. You can then find the new virtual node named
virtual-kubelet-<zoneId>-linux-arm64on the Nodes page.
Kubectl
Prerequisites
Obtain the kubeconfig file of a cluster and use kubectl to connect to the cluster.
Procedure
Run the following command to edit the ConfigMap:
kubectl edit configmap eci-profile -n kube-system
-
Add or update the
enableLinuxArm64Nodeparameter and set its value totrue. -
Set the
vSwitchIdsparameter. Make sure that at least one vSwitch specified in thevSwitchIdslist resides in a zone that supports Arm-based instances.NoteIf all vSwitches in your cluster are in zones that do not support Arm-based instances, you must first create a vSwitch in a supported zone. After the vSwitch is created, add its ID to the
vSwitchIdsfield. For more information about how to create a vSwitch in a specific zone, see Create and manage vSwitches.After you complete the configuration, wait about 30 seconds. You can then find the new virtual node named
virtual-kubelet-<zoneId>-linux-arm64on the Nodes page.
Step 2: Schedule to an Arm virtual node
Schedule Arm-only workloads
If your cluster has both Arm and non-Arm nodes and your application is Arm-only, you must schedule it to an Arm node. This prevents the pod from failing to start on a non-Arm node. By default, all Arm nodes have the label kubernetes.io/arch=arm64. You can use a nodeSelector or nodeAffinity to deploy the application to Arm nodes.
nodeSelector
You can add the following nodeSelector constraint to your pod specification to schedule it to an Arm virtual node. This constraint ensures that the workload is scheduled only to nodes that have the arm64 label. All Arm virtual nodes in an ACK cluster or have this label.
nodeSelector:
kubernetes.io/arch: arm64 # Specify an Arm node.
You can use the following sample YAML to deploy a stateless application to an Arm virtual node.
nodeAffinity
Prerequisites
The virtual node scheduling feature is enabled for the cluster, and the cluster and component versions meet the requirements.
Example
You can add the following nodeAffinity constraint to your pod specification to deploy the application to an Arm node. This constraint ensures that the pod is scheduled only to nodes that have the label kubernetes.io/arch=arm64.
When the pod specification contains this constraint, the scheduler automatically tolerates the kubernetes.io/arch=arm64:NoSchedule taint on the node.
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- arm64
You can use the following sample YAML to deploy a stateless application to an Arm virtual node.
Schedule multi-architecture images
Prerequisites
The virtual node scheduling feature is enabled for the cluster, and the cluster and component versions meet the requirements.
Example
By default, ACK clusters and schedule all workloads to x86 virtual nodes. If x86 node resources are insufficient, the pods remain pending, waiting for available x86 resources. If your application uses a multi-architecture image that supports both x86 and Arm architectures, you must configure scheduling across both node architectures.
For example, you can configure node affinity to preferentially schedule workloads to either Arm or x86 virtual nodes. If resources of the preferred type are insufficient, the scheduler attempts to schedule the workload to a virtual node of the other architecture.
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- arm64
Prefer Arm architecture
The following is a sample YAML for a workload that is preferentially scheduled to an Arm virtual node.
Prefer x86 architecture
FAQ
Scheduling priority of Arm and x86 nodes
By default, the cluster scheduler prioritizes scheduling workloads to ECS instances. If ECS instance resources are insufficient, the scheduler then considers virtual nodes. Without modifying the weights of the scheduler scoring plugins, a pod may be scheduled to an x86 ECS instance if sufficient resources are available, even if you configure nodeAffinity to prioritize Arm nodes. Therefore, the nodeAffinity configurations in this topic only guarantee scheduling priority between different virtual node architectures (Arm vs. x86), not between virtual nodes and ECS instances.
Can I use Arm preemptible instances?
Yes, Arm-based preemptible instances are available. For more information, see Use preemptible instances.
Network configuration for Arm virtual nodes
After you create an ACK cluster or , configure the vSwitchIds field in the eci-profile to select a vSwitch in a zone that supports Arm-based instances. This ensures that the virtual nodes support the Arm architecture.
What are the limitations of using Arm architecture nodes in ACK cluster?
Currently, components from the App Marketplace are not supported on the Arm architecture. In the Component Center, only components in the following categories are supported:
-
Core components
-
Logging and monitoring
-
Storage
-
Network
Related documents
-
Container Registry Enterprise Edition (ACR EE) lets you build multi-architecture container images. For more information, see Build multi-architecture container images.
-
If you need to create and manage regular Arm ECS nodes, see Schedule workloads to Arm nodes.
-
If you need to run big data tasks and do not want to handle the operations and maintenance of underlying cluster resources, you can run Spark jobs on Arm virtual nodes.