All Products
Search
Document Center

Container Compute Service:Use the Argo CLI to create workflows

Last Updated:Mar 26, 2026

Create a workflow

Argo Workflows is a Kubernetes-native workflow engine for orchestrating concurrent jobs. This tutorial walks you through submitting a sample workflow using the Argo CLI and verifying that it runs to completion.

In this tutorial, you will:

  • Define a workflow in YAML

  • Submit the workflow to your cluster

  • Verify that the workflow completes successfully

Prerequisites

Before you begin, ensure that you have:

Submit a workflow

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

    apiVersion: argoproj.io/v1alpha1
    kind: Workflow                # Defines a new Kubernetes resource type for Argo Workflows.
    metadata:
      generateName: hello-world-  # The prefix for the workflow name. Kubernetes will append a unique suffix.
    spec:
      entrypoint: main            # Specifies the template to execute first.
      templates:
        - name: main              # The name of the template.
          container:
            image: mirrors-ssl.aliyuncs.com/busybox:latest
            command: [ echo ]
            args: [ "hello world" ]
  2. Submit the workflow:

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

    1. Run the following command to get the list of workflows:

      argo list -n argo

      Expected output:

      NAME                STATUS      AGE   DURATION   PRIORITY
      hello-world-XXXXX   Succeeded   2m    37s        0

      This output indicates that the workflow is complete.

    2. Run the following command to check the status of the workflow:

      argo get hello-world-XXXXX -n argo

      Expected output:

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

      Status: Succeeded confirms the workflow completed without errors.

What's next

Workflow resources are periodically deleted. To persist workflow data to a database, see Persist workflows.