Create a workflow cluster
Run Argo Workflows at scale on serverless ECI by optimizing Kubernetes cluster parameters for efficient elastic scheduling, with preemptible instances for cost efficiency.
Prerequisites
Ensure that you have:
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 jqCentOS:
yum install jqUbuntu:
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. 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.
vSwitch
The vSwitch within the VPC.
SLB Instance for API Server
No configuration required. A Server Load Balancer (SLB) slb.s2.small instance is auto-created. Deleting it makes the API server inaccessible. See Billing overview .
Modify pay-as-you-go instances, if the default specification is insufficient.
Create and Associate EIP
Specifies whether to create an elastic IP address (EIP) 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
kube-apiserverandkube-controller-managerlogs 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=workflow1Configure 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 true to use an enterprise security group.
trueto use an advanced security group.ApiServerPublicEipNo
Set to
trueto expose the API server via 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 now target this cluster by default.
Delete a workflow cluster
Delete all workflows, pods, and ECI instances in the cluster before deletion.
Use the console
Log on to the ACK One console.
Select the cluster to delete from the drop-down list.
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_IDDelete the workflow cluster.
aliyun adcp DeleteHubCluster --ClusterId $CLUSTER_ID