Create a workflow cluster

Updated at:

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:

Create a workflow cluster

Use the console

  1. Log on to the ACK One console.

  2. 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-apiserver and kube-controller-manager logs for auditing. See Billing overview.

Use the Alibaba Cloud CLI

  1. 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
  2. Configure the CLI region and create a workflow cluster.

    Parameter

    Required

    Description

    Profile

    Yes

    Set to XFlow.

    RegionId

    Yes

    The region where the cluster is deployed.

    VpcId

    Yes

    The ID of the VPC.

    VSwitches

    Yes

    JSON array of vSwitch IDs. Use different zones for high availability.

    Name

    No

    The cluster name.

    IsEnterpriseSecurityGroup

    Yes

    Set to true to use an enterprise security group.true to use an advanced security group.

    ApiServerPublicEip

    No

    Set to true to 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 true

    Sample output:

    {
        "ClusterId": "c1234abcd...",
        "RequestId": "A1B2C3D4...",
        "TaskId": "T9876..."
    }

    Save the ClusterId value for the following steps.

    export CLUSTER_ID=<your-cluster-id>
  3. Wait for the cluster to reach the running state.

    aliyun adcp DescribeHubClusterDetails --ClusterId $CLUSTER_ID | jq .Cluster.ClusterInfo

    Rerun until the status shows running.

  4. 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-kubeconfig

    Both kubectl and the Argo CLI now target this cluster by default.

Delete a workflow cluster

Important

Delete all workflows, pods, and ECI instances in the cluster before deletion.

Use the console

  1. Log on to the ACK One console.

  2. Select the cluster to delete from the drop-down list.

  3. On the Workflow Cluster page, click Delete Workflow Cluster. Click OK to confirm.

Use the Alibaba Cloud CLI

  1. Disable Argo Server and delete the associated SLB and ECI instances.

    aliyun adcp UpdateHubClusterFeature --ArgoServerEnabled false --ClusterId $CLUSTER_ID
  2. Delete the workflow cluster.

    aliyun adcp DeleteHubCluster --ClusterId $CLUSTER_ID

Next steps

References