Run Argo Workflows at scale on serverless Elastic Container Instance (ECI) by optimizing Kubernetes cluster parameters for efficient elastic scheduling, with spot instances for cost efficiency.
Prerequisites
Ensure that you have:
-
Distributed Cloud Container Platform for Kubernetes (ACK One) is activated.
-
Alibaba Cloud CLI 3.0.159 or later installed and credentials configured
-
The AliyunAdcpFullAccess policy is granted to the RAM user
-
jqinstalled (required for CLI steps):-
macOS:
brew install jq -
CentOS:
yum install jq -
Ubuntu:
apt-get install jq
-
Create a workflow cluster
Use the console
-
Log on to the ACK One console.
-
On the Workflow Cluster page, click Create Workflow Cluster. In the panel that appears, configure the following parameters, and click Create.
Parameter
Description
Cluster Name
1–63 characters: letters, digits, underscores (
_), and hyphens (-). Must start with a letter.Region
The deployment region.
VPC
The VPC for the cluster. Select an existing VPC from the drop-down list.
vSwitch
Select an existing vSwitch from the drop-down list.
SLB Instance for API Server
No configuration required. A Server Load Balancer (SLB) Standard I (slb.s2.small) instance is auto-created. Deleting it makes the API server inaccessible. See Billing overview.
Create and Associate EIP
Specifies whether to create an elastic IP address (EIP) for the internal-facing SLB instance and expose the API server to the Internet. The EIP cannot be disassociated afterward because child clusters may already use the fleet's public access endpoint. If disabled, the API server is not Internet-accessible. See Billing overview.
Enable Collection of Operation Logs and Auditing Logs
Enables Simple Log Service (SLS). Creates a service named k8s-log-{ClusterID} that collects logs from managed control plane components, such as
kube-apiserverandkube-controller-manager, for auditing. See Billing overview.
Use the Alibaba Cloud CLI
-
Set environment variables. Replace placeholders with your resource IDs.
export REGION_ID=cn-zhangjiakou export VPC_ID=<your-vpc-id> export VSWITCH_IDS='["<vsw-id-1>","<vsw-id-2>"]' export CLUSTER_NAME=workflow1 -
Configure the CLI region and create a workflow cluster.
Parameter
Required
Description
ProfileYes
Set to
XFlow.RegionIdYes
The region where the cluster is deployed.
VpcIdYes
The ID of the VPC.
VSwitchesYes
JSON array of vSwitch IDs. Use different zones for high availability.
NameNo
The cluster name.
IsEnterpriseSecurityGroupYes
Set to
trueto use an enterprise security group.ApiServerPublicEipNo
Set to
trueto expose the API server by using an EIP.aliyun configure set --region $REGION_ID aliyun adcp CreateHubCluster \ --Profile XFlow \ --RegionId $REGION_ID \ --VpcId $VPC_ID \ --VSwitches "$VSWITCH_IDS" \ --Name $CLUSTER_NAME \ --ApiServerPublicEip true \ --IsEnterpriseSecurityGroup trueSample output:
{ "ClusterId": "c1234abcd...", "RequestId": "A1B2C3D4...", "TaskId": "T9876..." }Save the
ClusterIdvalue for the following steps.export CLUSTER_ID=<your-cluster-id> -
Wait for the cluster to reach the
runningstate.aliyun adcp DescribeHubClusterDetails --ClusterId $CLUSTER_ID | jq .Cluster.ClusterInfoRerun until the status shows
running. -
Generate and export a kubeconfig file.
aliyun adcp DescribeHubClusterKubeconfig --ClusterId $CLUSTER_ID \ | jq -r .Kubeconfig \ | tee ack-argo-workflow-kubeconfig export KUBECONFIG=ack-argo-workflow-kubeconfigBoth
kubectland the Argo CLI target this cluster by default.
Delete a workflow cluster
Delete all workflows in the cluster before deletion. This triggers deletion of the pods and the associated ECI resources.
Use the console
-
Log on to the ACK One console.
-
In the upper-left corner of the page, click the drop-down list next to the cluster name, and select the cluster to delete.
-
On the Workflow Cluster page, click Delete Workflow Cluster. Click OK to confirm.
Use the Alibaba Cloud CLI
-
Disable Argo Server and delete the associated SLB and ECI instances.
aliyun adcp UpdateHubClusterFeature --ArgoServerEnabled false --ClusterId $CLUSTER_ID -
Delete the workflow cluster.
aliyun adcp DeleteHubCluster --ClusterId $CLUSTER_ID