All Products
Search
Document Center

Container Service for Kubernetes:Modify the configuration of a workflow cluster

Last Updated:Mar 25, 2026

Use the Alibaba Cloud CLI to update your workflow cluster's vSwitch assignments, scheduling mode, ConfigMap settings, and elastic container instance (ECI) quotas.

Prerequisites

Before you begin, ensure that you have:

Specify vSwitches for the workflow cluster

Assigning multiple vSwitches in different zones lets the workflow cluster create elastic container instances across zones. The cluster distributes workloads across zones for load balancing. If instances are unavailable in one zone, the cluster automatically tries another.

Limits:

  • All vSwitches must belong to the same virtual private cloud (VPC).

  • You can specify up to 10 vSwitches.

  1. Query the vSwitches currently used by the workflow cluster:

    aliyun adcp DescribeHubClusterDetails --ClusterId <cluster-id> | jq .Cluster.WorkflowConfig.WorkflowUnits
  2. Update the vSwitch list. Include the existing vSwitches along with any new ones:

    Important

    Always include the original vSwitches in the command. Omitting them removes those vSwitches from the cluster.

    aliyun adcp UpdateHubClusterFeature --VSwitches "[\"vsw-xxx\",\"vsw-xxx\",\"vsw-xxx\"]" --ClusterId <cluster-id>

Set the scheduling mode

Workflow clusters support two scheduling modes. Choose based on your cost and reliability requirements.

ModeDescriptionInstance typeBest for
Inventory-prioritizedDefault mode. Creates pay-as-you-go elastic container instances.Pay-as-you-goPredictable workloads that require high availability
Cost-prioritizedCreates preemptible elastic container instances at lower cost.PreemptibleFault-tolerant, cost-sensitive batch workloads

Inventory-prioritized mode

aliyun adcp UpdateHubClusterFeature --WorkflowScheduleMode "stock-optimized" --ClusterId <cluster-id>

Cost-prioritized mode

Preemptible elastic container instances can be reclaimed before a workflow completes, which may cause workflow failures. To improve the instance creation success rate, specify multiple instance types and zones.

Set cost-prioritized mode with a price limit:

aliyun adcp UpdateHubClusterFeature --WorkflowScheduleMode "cost-optimized" --PriceLimit "0.10" --ClusterId <cluster-id>

Set cost-prioritized mode without a price limit (the cluster bids at the current market price):

aliyun adcp UpdateHubClusterFeature --WorkflowScheduleMode "cost-optimized" --PriceLimit "" --ClusterId <cluster-id>

If preemptible instances are out of stock and no price limit is set, the cluster falls back to pay-as-you-go instances.

Parameters:

ParameterRequiredDescription
WorkflowScheduleModeYesScheduling mode. Valid values: stock-optimized (inventory-prioritized), cost-optimized (cost-prioritized).
PriceLimitNoHourly upper price limit per vCore. Unit: USD/hour. Applies only when WorkflowScheduleMode is cost-optimized. Leave blank to bid at the current market price. Example: "0.10".

How the price limit works:

The limit applies per vCore and per 4 GiB of memory. For example, with a limit of USD 0.10/hour:

Pod resourcesCalculationMaximum hourly price
2 vCores, 4 GiB0.10 × 2 + 0.10 × (4 / 4)USD 0.30/hour
4 vCores, 32 GiB0.10 × 4 + 0.10 × (32 / 4)USD 1.20/hour

Configure the workflow-controller-configmap

The workflow-controller-configmap ConfigMap lets you customize Argo Workflow behavior, including:

  • Offloading large workflow statuses from etcd to PostgreSQL or MySQL

  • Archiving completed workflows to PostgreSQL or MySQL

  • Adjusting pod garbage collection settings

Important
  • The ConfigMap belongs to the namespace named after the cluster ID.

  • Do not delete the following parameters from the podMetadata section. Removing them breaks ECI scheduling for the workflow cluster.

podMetadata:
  labels:
    workflow.xflow.aliyun: xflow
  annotations:
    k8s.aliyun.com/eci-auto-imc: "true"
    k8s.aliyun.com/eci-fail-strategy: "fail-fast"

Manage elastic container instance quotas

By default, each Alibaba Cloud account can use up to 1,000 vCores for elastic container instances.