Skip to main content
This lesson shows how to create and run a simple Argo Workflow, either from the Argo Workflows UI or with the Argo CLI. You’ll learn what the workflow YAML declares, how to submit it from the UI, how to submit via the CLI (including common flags), and how to inspect and retrieve logs for the run.

Overview

  • Argo Workflows are Kubernetes custom resources. You submit a Workflow manifest and the Argo controller creates pods to execute the defined steps.
  • Workflows are easily submitted from:
    • The Argo Web UI — great for exploring templates and visual debugging.
    • The Argo CLI — useful for automation and CI/CD pipelines.

Workflow YAML

Below is a minimal example Workflow. Key fields:
  • apiVersion / kind: identifies the resource as an Argo Workflow.
  • metadata.generateName: generates a unique name for each run, preventing collisions when rerunning workflows.
  • spec.entrypoint: the name of the template that should run first.
  • templates: one or more templates. Each template can be a container template and takes the same options a Kubernetes Pod container supports (image, command, args, env, volumeMounts, etc.).
generateName is helpful when running the same workflow repeatedly: it appends a unique suffix so each workflow run gets a distinct name and avoids resource-name collisions.

Submit from the UI

  1. Open the Argo Workflows web UI and click “Submit New Workflow”.
  2. Paste the YAML above (or select a saved template) into the submission form.
  3. Create the workflow. The UI will show a summary (name, pod name, host node, phase, and action buttons like Resubmit, Suspend, Stop, Terminate, Delete).
  4. Click into the workflow to view templates, inputs/outputs, and logs.
A screenshot of the Argo Workflows web UI showing a workflow named "cowsay-7pzj4." The right-hand summary panel lists details like ID, pod name, host node, phase "Pending" with message "PodInitializing," while control buttons (Resubmit, Suspend, Stop, Terminate, etc.) appear across the top.

Submit from the CLI

The Argo CLI supports many flags for connecting and authenticating to the Argo Server. Below is a concise table of common flags and their purpose: A more complete (version-dependent) list of flags is available from argo --help. Check the Argo components and other pods in your cluster (example using kubectl):
Submit the workflow from a remote URL and stream progress with --watch:
When you submit a workflow using generateName, Argo assigns a unique name (for example, cowsay-nzs5t). The CLI will stream the workflow progress and show the final status.

Inspecting the workflow

You can get a concise workflow summary from the CLI (or inspect via the UI). Example argo get output (abridged):
Check pods again to see workflow-created pods and their status:

Viewing logs

You can retrieve logs using either kubectl or the Argo CLI: kubectl logs (pod):
Sample output (kubectl logs):
argo logs (workflow):
Sample output (argo logs prefixes output with pod name):
The same logs are available in the Argo UI when you open the workflow and click “Logs”. At this point you should see two workflows in the UI (one created from the UI and one created via the CLI), both producing the same cowsay output when you inspect their logs.
A browser screenshot of the Argo Workflows web UI showing a workflow named "cowsay-nzs5t" with status, start/finish times, duration, conditions and labels. The left sidebar displays namespace and filter options and the top bar has "Submit New Workflow" and "Completed Workflows" buttons.

Watch Video

Practice Lab