All Products
Search
Document Center

Container Service for Kubernetes:Configure ACS computing resources for a Knative Service

Last Updated:Mar 26, 2026

Container Compute Service (ACS) lets you run Knative Service pods on ACS computing power, which provides diverse compute types and quality levels to meet different workload demands and help you optimize costs. You pay only for the CPU and memory each pod consumes.

To use ECI computing power instead of ACS, see Use ECI resources.

How it works

When a pod is scheduled to an ACK Virtual Node, the Virtual Node can provision it on either ACS or ECI. Adding the label alibabacloud.com/acs: "true" to the pod template tells the Virtual Node to use ACS as the underlying compute. Two optional labels let you control the compute type and compute quality of the ACS instance.

Billing

ACS CPU computing resources are billed on a pay-as-you-go basis. For details, see Billing.

Prerequisites

Before you begin, ensure that you have:

Configure a Knative Service to use ACS

  1. Create a YAML file for your Knative Service. Add the required label and any optional labels to spec.template.metadata.labels. The following labels control ACS scheduling: Example service.yaml:

    Label Required Default Description
    alibabacloud.com/acs Required Set to "true" to run the pod on ACS computing power
    alibabacloud.com/compute-class Optional general-purpose Specifies the compute type
    alibabacloud.com/compute-qos Optional default Specifies the compute quality
    apiVersion: serving.knative.dev/v1
    kind: Service
    metadata:
      name: knative-acs-sample
      namespace: default
    spec:
      template:
        metadata:
          labels:
            # Required: run this pod on ACS computing power
            alibabacloud.com/acs: "true"
            # Optional: compute type (default: general-purpose)
            alibabacloud.com/compute-class: "general-purpose"
            # Optional: compute quality (default: default)
            alibabacloud.com/compute-qos: "default"
        spec:
          containers:
          - image: registry-vpc.cn-hangzhou.aliyuncs.com/knative-sample/helloworld-go:73fbdd56 # Replace with the image in your region
            name: acs-container
            imagePullPolicy: IfNotPresent
  2. Deploy the Knative Service.

    kubectl apply -f service.yaml
  3. Verify that the pod is running on ACS.

    # Get the pod name
    POD_NAME=$(kubectl get pod -l serving.knative.dev/service=knative-acs-sample -o jsonpath='{.items[0].metadata.name}')
    
    # View pod annotations
    kubectl get pod $POD_NAME -o yaml

    In the output, check the alibabacloud.com/instance-id annotation under annotations. A value starting with acs- confirms the pod is running on ACS. Other annotation fields can be ignored.

    annotations:
      alibabacloud.com/cpu-vendors: intel
      alibabacloud.com/instance-id: acs-uf6008givz7tfq****** # Starts with "acs-" — pod is on ACS
      alibabacloud.com/pod-use-spec: 0.25-0.5Gi
      ...

What's next