All Products
Search
Document Center

Container Service for Kubernetes:Schedule workloads to FPGA nodes

Last Updated:Mar 26, 2026

FPGA-accelerated nodes in an ACK cluster carry dedicated node labels that expose FPGA hardware attributes. Use these labels in your workload's nodeSelector to ensure pods land only on FPGA nodes—preventing ordinary workloads from consuming FPGA capacity.

Prerequisites

Before you begin, ensure that you have:

FPGA node labels

When you add FPGA-accelerated nodes to an ACK cluster, ACK automatically attaches node labels that describe the FPGA hardware. The following label is used for scheduling:

Label Value Description
fpga.k8s.aliyun.com f3 Alibaba Cloud ECS f3 FPGA instance

Set this label as a nodeSelector in your workload spec to target FPGA nodes. Set resources.limits with the corresponding FPGA resource key to request an FPGA unit.

Step 1: View FPGA node labels

Method 1: ACK console

  1. Log on to the ACK console. In the left-side navigation pane, click Clusters.

  2. On the Clusters page, find the cluster and click its name. In the left-side navigation pane, choose Nodes > Nodes.

  3. On the Nodes page, find the FPGA-accelerated node, then choose More > Details in the Actions column. View the labels attached to the node. Node details

Method 2: kubectl

  1. List all nodes in the cluster:

    kubectl get nodes

    Expected output:

    NAME                       STATUS   ROLES    AGE     VERSION
    cn-beijing.192.168.XX.X1   Ready    <none>   3h51m   v1.18.8-aliyun.1
    cn-beijing.192.168.XX.X2   Ready    <none>   3h41m   v1.18.8-aliyun.1
  2. Describe the FPGA-accelerated node to view its labels:

    kubectl describe node cn-beijing.192.168.XX.X2

    Expected output:

    Name:               cn-beijing.192.168.XX.X2
    Roles:              <none>
    Labels:             ack.aliyun.com=c05888610e***
                        alibabacloud.com/nodepool-id=npfda879b6***
                        beta.kubernetes.io/arch=amd64
                        beta.kubernetes.io/instance-type=ecs.f3-c4f1.xlarge
                        beta.kubernetes.io/os=linux
                        failure-domain.beta.kubernetes.io/region=cn-beijing
                        failure-domain.beta.kubernetes.io/zone=cn-beijing-h
                        fpga.k8s.aliyun.com=f3
                        kubernetes.io/arch=amd64
                        kubernetes.io/hostname=cn-beijing.192.168.XX.X2
                        kubernetes.io/os=linux
                        node.kubernetes.io/instance-type=ecs.f3-c4f1.xlarge
                        topology.diskplugin.csi.alibabacloud.com/zone=cn-beijing-h
                        topology.kubernetes.io/region=cn-beijing
                        topology.kubernetes.io/zone=cn-beijing-h

    The fpga.k8s.aliyun.com=f3 label identifies this as an ECS f3 FPGA instance. Use this label in the next step to target the node.

Step 2: Schedule pods to FPGA-accelerated nodes

The following Job spec uses nodeSelector: fpga.k8s.aliyun.com: f3 to target f3 FPGA nodes and xilinx.com/fpga-aliyun-f3: 1 to request one FPGA unit.

  1. Log on to the ACK console. In the left-side navigation pane, click Clusters.

  2. On the Clusters page, find the cluster and click its name. In the left-side navigation pane, choose Workloads > Deployments.

  3. On the Deployments page, click Create from YAML.

  4. Select a custom template from the sample templates drop-down list, then copy the following content to the Template field.

    apiVersion: batch/v1
    kind: Job
    metadata:
      name: fpga-run-task1
    spec:
      backoffLimit: 0
      completions: 1
      parallelism: 1
      template:
        spec:
          nodeSelector:
            fpga.k8s.aliyun.com: f3
          containers:
          - image: <your image>
            imagePullPolicy: Always
            name: fpga-run-task1
            resources:
              limits:
                xilinx.com/fpga-aliyun-f3: 1
            securityContext:
              privileged: true

    Replace the value of <your image> with the address of your custom image.

  5. Click Create. In the left-side navigation pane of the cluster details page, choose Workloads > Pods. In the list of pods, you can view that the specified pod is scheduled to the required FPGA-accelerated node. You can use labels to schedule pods to specific FPGA-accelerated nodes with ease.