All Products
Search
Document Center

Container Service for Kubernetes:Create an Argo workflow

Last Updated:Jun 23, 2026

Built on the open-source Argo Workflow project, workflow clusters support CI/CD pipelines, data processing, machine learning, and simulation workloads. This topic shows how to create and submit an Argo workflow with the Argo CLI or Argo UI.workflow cluster with the Argo CLI or Argo UI.

Prerequisites

An Argo workflow cluster is created.

Workflow ServiceAccount

A workflow can use a specified ServiceAccount to access other Kubernetes resources at runtime. The workflow cluster automatically binds the necessary permissions to any custom ServiceAccount you create.

Procedure

You can create a workflow with the Argo CLI or the Argo UI.

Argo CLI

Step 1: Install the Argo CLI

The Alibaba Cloud Argo CLI is fully compatible with the open-source version and adds metrics and logging capabilities, including CPU and memory consumption, execution cost, and logs from deleted Pods.

  1. Download the Alibaba Cloud Argo CLI.

    These steps are for Linux. For macOS, download the Argo CLI from https://ack-one.oss-cn-hangzhou.aliyuncs.com/cli/v3.4.12/argo-cli-aliyun-darwin.
    wget https://ack-one.oss-cn-hangzhou.aliyuncs.com/cli/v3.4.12/argo-cli-aliyun-linux
  2. Make argo-cli-aliyun-linux executable.

    chmod +x argo-cli-aliyun-linux
  3. Move the executable to a directory in your PATH, such as /usr/local/bin/.

    mv argo-cli-aliyun-linux /usr/local/bin/argo

Step 2: Create a workflow

  1. Create a file named helloworld-workflow.yaml with the following content.

    apiVersion: argoproj.io/v1alpha1
    kind: Workflow
    metadata:
      generateName: helloworld-- # Workflow name prefix
    spec:
      entrypoint: helloworld # Specifies the entrypoint workflow template
      templates:
      - name: helloworld
        container:
          image: mirrors-ssl.aliyuncs.com/busybox:latest
          command:
          - sh
          - -c
          args:
          - echo "Hello, world!";
            sleep 60;
  2. Submit the workflow.

    argo submit helloworld-workflow.yaml
  3. Check the workflow status.

    1. List workflows.

      argo list

      Expected output:

      NAME               STATUS      AGE   DURATION   PRIORITY
      helloworld-lgdpp   Succeeded   2m    37s        0
    2. Get workflow details.

      argo get helloworld-lgdpp

      Expected output:

      Name:                hello-world-lgdpp
      Namespace:           default
      ServiceAccount:      unset (will run with the default ServiceAccount)
      Status:              Succeeded
      Conditions:
       PodRunning          False
       Completed           True
      ....
      Duration:            1 minute 46 seconds
      Progress:            1/1
      ResourcesDuration:   17s*(1 cpu),17s*(100Mi memory)
      STEP                  TEMPLATE  PODNAME            DURATION  MESSAGE
       ✔ hello-world-lgdpp  helloworld  hello-world-lgdpp  1m

Argo UI

  1. Log on to the Argo Workflow Clusters console and click the target cluster name.

  2. On the Cluster information page, click the Basic information tab, and then click Workflow console (Argo) to open the Argo UI.

  3. In the left-side navigation pane, click workflow template. Enter default in the namespace field to view the predefined templates.

    The predefined templates are dag-diamond, loops, and steps.

  4. Select a workflow template and click SUBMIT to run the workflow.