Skip to main content
This example demonstrates the Argo Workflows “steps” template using a small workflow named “Cosmic Moo”. The entrypoint template is triple-moo. The steps template models a list of lists: each outer list element (a step group) runs sequentially, and each item inside an inner list runs in parallel with the other items in that same group. Key concepts:
  • Outer list elements = sequential groups (one group runs after the previous completes).
  • Inner list items = tasks that run in parallel within their group.
The steps template structure is a list of lists. Each top-level list element is a step group executed sequentially; items inside that group (an inner list) execute in parallel.

Example workflow

In this workflow:
  • The first step group contains a single step first-moo that runs first.
  • After first-moo completes, the second step group runs two items in parallel: parallel-moo-a and parallel-moo-b.
  • All steps call the cow-says template and pass a message parameter.
YAML:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: cosmic-moo-
spec:
  entrypoint: triple-moo
  templates:
  - name: triple-moo
    steps:
      # First group (runs first)
      - - name: first-moo
          template: cow-says
          arguments:
            parameters:
              - name: message
                value: "Cosmic Ranch!"
      # Second group (runs after the first group completes). Items here run in parallel.
      - - name: parallel-moo-a
          template: cow-says
          arguments:
            parameters:
              - name: message
                value: "Galaxy Moo!"
        - name: parallel-moo-b
          template: cow-says
          arguments:
            parameters:
              - name: message
                value: "Milky Whey!"

  - name: cow-says
    inputs:
      parameters:
        - name: message
    container:
      image: rancher/cowsay
      command: ["cowsay"]
      args: ["{{inputs.parameters.message}}"]

How execution proceeds

  1. Argo executes the first outer list element — the group containing first-moo.
  2. Once first-moo succeeds, Argo proceeds to the next outer list element.
  3. The next group contains parallel-moo-a and parallel-moo-b; those run concurrently.
Table: steps template summary
ComponentBehaviorExample
Outer list element (step group)Runs sequentially, one group after anotherThe first group runs before the second group
Inner list itemsRun in parallel within the same groupparallel-moo-a and parallel-moo-b run concurrently
Template referenceDefines the work each step performscow-says template runs the rancher/cowsay container

Sample logs

When you inspect the logs for first-moo, you’ll see the cowsay output such as:
< Cosmic Ranch! >
-----------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     |
Each parallel task (parallel-moo-a and parallel-moo-b) will produce its own cowsay output when they run.

Previewing the execution graph

You can preview how the workflow will execute before submitting it using the Argo Workflows UI. Paste the YAML into the UI and choose the graph view to see the sequence and parallelism visually.
A screenshot of the Argo Workflows web UI showing a workflow graph with nodes labeled "cosmic-moo-nx4xq", "first-moo", and two parallel tasks ("parallel-moo-a" and "parallel-moo-b"). The right-hand panel displays the selected node's details, including pod name, host node, and a "Succeeded" phase.
This rendered graph helps you visualize which steps run sequentially and which run in parallel.

Watch Video