Workflow clusters run Argo Workflows on a serverless architecture, using Elastic Container Instance (ECI) as the compute layer. The cluster automatically schedules large-scale workflows with preemptible instances to keep costs low.
Prerequisites
Before you begin, ensure that you have:
Activated Distributed Cloud Container Platform for Kubernetes (ACK One)
Alibaba Cloud CLI 3.0.159 or later installed and credentials configured. See Install the Alibaba Cloud CLI and Configure credentials
The RAM policy AliyunAdcpFullAccess attached to a RAM user. See Grant permissions to RAM users
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 in the upper-right corner. Configure the parameters in the panel that appears, then click Create.
Parameter Description Cluster Name Enter a name for the cluster. The name must be 1–63 characters long, can contain letters, digits, underscores ( _), and hyphens (-), and must start with a letter.Region Select the region to deploy the cluster. VPC Select a VPC from the drop-down list. vSwitch Select a vSwitch from the drop-down list. SLB Instance for API Server No configuration required. A Server Load Balancer (SLB) instance of type slb.s2.small is created automatically. Deleting this instance makes the API server inaccessible. For billing details, see Billing overview. Create and Associate EIP Controls whether an elastic IP address (EIP) is associated with the SLB instance. If enabled, the system creates an EIP and exposes the API server to the Internet. The EIP cannot be disassociated afterward. If disabled, the API server cannot be accessed over the Internet. For billing details, see Billing overview. Enable Collection of Operation Logs and Auditing Logs Enables Simple Log Service. When enabled, the system creates a service named k8s-log-{ClusterID} and collects logs from kube-apiserverandkube-controller-managerfor audit purposes. For billing details, see Billing overview.
Use the Alibaba Cloud CLI
Set your environment variables. Replace the placeholder values with your actual 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 A JSON array of vSwitch IDs. Specify vSwitches in different zones for high availability. NameNo The cluster name. IsEnterpriseSecurityGroupYes Set to trueto use an advanced security group.ApiServerPublicEipNo Set to trueto expose the API server endpoint over the Internet 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 trueThe command returns output similar to:
{ "ClusterId": "c1234abcd...", "RequestId": "A1B2C3D4...", "TaskId": "T9876..." }Save the
ClusterIdvalue — you need it in the following steps.export CLUSTER_ID=<your-cluster-id>Wait for the cluster to reach the
runningstate before proceeding.aliyun adcp DescribeHubClusterDetails --ClusterId $CLUSTER_ID | jq .Cluster.ClusterInfoRerun the command until the cluster status shows
running.Generate a kubeconfig file and configure your environment to use it.
aliyun adcp DescribeHubClusterKubeconfig --ClusterId $CLUSTER_ID \ | jq -r .Kubeconfig \ | tee ack-argo-workflow-kubeconfig export KUBECONFIG=ack-argo-workflow-kubeconfigAfter exporting
KUBECONFIG,kubectland the Argo CLI use this cluster by default.
Delete a workflow cluster
Before deleting a workflow cluster, delete all workflows, pods, and Elastic Container Instances running in the cluster.
Use the console
Log on to the ACK One console.
Select the cluster to delete from the drop-down list in the upper-left corner.
On the Workflow Cluster page, click Delete Workflow Cluster in the upper-right corner. Click OK to confirm.
Use the Alibaba Cloud CLI
Disable Argo Server and delete the associated SLB instance and Elastic Container Instances.
aliyun adcp UpdateHubClusterFeature --ArgoServerEnabled false --ClusterId $CLUSTER_IDDelete the workflow cluster.
aliyun adcp DeleteHubCluster --ClusterId $CLUSTER_ID
What's next
To modify the configuration of this cluster, see Modify the configuration of a workflow cluster.
To start running workflows in the cluster, see Create a workflow.