Help Center/ Cloud Container Engine/ Best Practices/ Container/ Scheduling Workloads to Arm Nodes
Updated on 2026-11-16 GMT+08:00

Scheduling Workloads to Arm Nodes

A CCE cluster may contain both Arm and x86 nodes. To ensure that Arm-compatible applications are scheduled correctly, or that dual-architecture images are preferentially scheduled to Arm nodes, you can use Kubernetes-native scheduling features. This section provides a complete solution ranging from preferential scheduling to forcible scheduling.

This section describes three scheduling configurations for you to choose from.

Scenario

Scheduling Intent

Recommended Configuration

Pure Arm applications

Forcibly schedule workloads to Arm nodes. Workloads cannot be scheduled to x86 nodes.

nodeSelector or required node affinity

Dual-architecture applications, preferentially scheduled to Arm nodes

Preferentially schedule workloads to Arm nodes. If Arm node resources are insufficient, workloads can fall back to x86 nodes.

preferred node affinity

Dual-architecture applications, forcibly scheduled to Arm nodes

Pods must be scheduled to Arm nodes. If no Arm node is available, pods remain in the pending state.

required node affinity

Creating an Arm Node Pool

  1. Log in to the CCE console.
  2. Click the cluster name to access the cluster console. In the navigation pane, choose Nodes. In the right pane, click the Node Pools tab.
  3. Click Create Node Pool in the upper right corner. In the Node Configuration area, select a Kunpeng flavor, for example, Kunpeng general computing-plus.

    Kunpeng instances are available in select regions and AZs. Log in to the console and verify availability in your target region before proceeding.

  4. Set other parameters as needed to create the node pool. For more details, see Creating a Node Pool.
  5. After the node pool is created, click Resize.
  6. In the Resize Node Pool dialog box, set Nodes to Be Added to the desired number (for example, 2).
  7. Click OK and wait for the nodes to be provisioned.

Scheduling Workloads to Arm Nodes

Scenario 1: Pure Arm Applications

Pods must run on Arm nodes only. Use either nodeSelector or required nodeAffinity for scheduling.

  • Method 1: Use nodeSelector.

    Configuration example:

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: test
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: test
      template:
        metadata:
          labels:
            app: test
        spec:
          containers:
          - name: test
            image: <your-arm64-only-image:latest>  # Replace it with the actual image path.
          nodeSelector: 
            kubernetes.io/arch: arm64   # Forcibly schedule pods to Arm nodes.
          imagePullSecrets:
          - name: default-secret
  • Method 2: Use nodeAffinity with requiredDuringSchedulingIgnoredDuringExecution.

    Configuration example:

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: test
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: test
      template:
        metadata:
          labels:
            app: test
        spec:
          containers:
          - name: test
            image: <your-arm64-only-image:latest>  # Replace it with the actual image path.
          affinity:
            nodeAffinity:
              requiredDuringSchedulingIgnoredDuringExecution:  # Hard constraint
                nodeSelectorTerms:
                - matchExpressions:
                  - key: kubernetes.io/arch
                    operator: In
                    values:
                    - arm64   # Forcibly schedule pods to Arm nodes.
          imagePullSecrets:
          - name: default-secret

Scenario 2: Dual-Architecture Applications (Prefer Arm)

Arm nodes are preferred, but if Arm resources are insufficient, pods can be scheduled to x86 nodes to ensure service availability. This is the recommended approach for most dual-architecture applications.

Configuration example:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: test
spec:
  replicas: 1
  selector:
    matchLabels:
      app: test
  template:
    metadata:
      labels:
        app: test
    spec:
      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:  # Soft constraint
          - weight: 100                    # A higher weight indicates a higher priority.
            preference:
              matchExpressions:
              - key: kubernetes.io/arch
                operator: In
                values:
                - arm64
      containers:
      - name: test
        image: <your-multi-arch-image:latest>   # Replace it with the actual image path. The image must support both amd64 and arm64 architectures.
      imagePullSecrets:
      - name: default-secret

Scenario 3: Dual-Architecture Applications (Require Arm)

Pods must run on Arm nodes. If no Arm node is available, pods remain in the pending state and are not scheduled.

Configuration example:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: test
spec:
  replicas: 1
  selector:
    matchLabels:
      app: test
  template:
    metadata:
      labels:
        app: test
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:  # Hard constraint
            nodeSelectorTerms:
            - matchExpressions:
              - key: kubernetes.io/arch
                operator: In
                values:
                - arm64
      containers:
      - name: test
        image: <your-multi-arch-image:latest>   # Replace it with the actual image path.
      imagePullSecrets:
      - name: default-secret

The YAML configuration is identical to Scenario 1 (pure Arm applications). The difference is the image. In this scenario, the image supports both architectures, but you force Arm scheduling for performance or cost optimization.

FAQs

How Do I Verify Arm Node Scheduling?

  1. Check the node where the pod is running.
    kubectl get pod <pod-name> -o wide
  2. Check the node architecture.
    kubectl get node <node-name> -o jsonpath='{.metadata.labels.kubernetes\.io/arch}'

    If the node label contains arm64, the pod is successfully scheduled to an Arm node.

How Do I Build Dual-Architecture Images?

Use Docker's manifest list feature to build multi-architecture container images. For details, see Using a Dual-Architecture Image (x86 and Arm).