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:
Alibaba Cloud CLI 3.0.172 or later installed and credentials configured. See Install Alibaba Cloud CLI and Configure credentials.
The
jqJSON processor installed. See jq Download.
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.
Query the vSwitches currently used by the workflow cluster:
aliyun adcp DescribeHubClusterDetails --ClusterId <cluster-id> | jq .Cluster.WorkflowConfig.WorkflowUnitsUpdate the vSwitch list. Include the existing vSwitches along with any new ones:
ImportantAlways 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.
| Mode | Description | Instance type | Best for |
|---|---|---|---|
| Inventory-prioritized | Default mode. Creates pay-as-you-go elastic container instances. | Pay-as-you-go | Predictable workloads that require high availability |
| Cost-prioritized | Creates preemptible elastic container instances at lower cost. | Preemptible | Fault-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:
| Parameter | Required | Description |
|---|---|---|
WorkflowScheduleMode | Yes | Scheduling mode. Valid values: stock-optimized (inventory-prioritized), cost-optimized (cost-prioritized). |
PriceLimit | No | Hourly 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 resources | Calculation | Maximum hourly price |
|---|---|---|
| 2 vCores, 4 GiB | 0.10 × 2 + 0.10 × (4 / 4) | USD 0.30/hour |
| 4 vCores, 32 GiB | 0.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
The ConfigMap belongs to the namespace named after the cluster ID.
Do not delete the following parameters from the
podMetadatasection. 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.
View your quota: Go to the Privileges and Quotas page in the Elastic Container Instance console.
Request a quota increase: Submit an application in the Quota Center console. For quota limits and details, see Limits on elastic container instances.