Skip to content

Argo Workflows: CAPA practice questions

Argo Workflows is a Kubernetes-native workflow engine. A Workflow resource both defines the work and records the state of its run, so it behaves as a live object. Its spec is essentially a list of templates and an entrypoint: templates behave like functions, and the entrypoint names the one to run first.

By Ibrahim Yesilay · Published · Updated

Independent community practice, not affiliated with or endorsed by CNCF or The Linux Foundation.

What Argo Workflows covers in CAPA

Argo Workflows is a Kubernetes-native workflow engine. A Workflow resource both defines the work and records the state of its run, so it behaves as a live object. Its spec is essentially a list of templates and an entrypoint: templates behave like functions, and the entrypoint names the one to run first.

Templates come in two groups. Template definitions do the work: container runs a container, script wraps a container around an inline script, and for both the standard output is exported as outputs.result for later steps; resource creates, gets, applies, deletes, replaces or patches cluster objects, and suspend pauses for a duration or until someone resumes the workflow; HTTP, container set and plugin templates also exist. Invocators call other templates: steps and dag. Steps are a list of lists, where the outer list runs in sequence and the items of each inner list run in parallel. A DAG declares tasks with dependencies; tasks without dependencies start immediately and the others wait until the ones they depend on are done.

The depends field gives finer control than plain dependencies by naming the result to wait for, such as task-1.Succeeded, task-2.Failed or Errored, Skipped (its when condition was false), Omitted or Daemoned, combined with &&, || and !. A bare task name is equivalent to Succeeded, Skipped or Daemoned.

Data moves through parameters and artifacts. A template declares inputs.parameters and reads them as {{inputs.parameters.message}}; values in spec.arguments.parameters are global and readable as {{workflow.parameters.name}}, and argo submit -p overrides them, while --entrypoint runs a different template. Artifacts are files or directories: a step declares an output artifact with a path, and a later step receives it as an input with from: {{steps.generate-artifact.outputs.artifacts.hello-art}}, or the tasks prefix inside a DAG. Artifact examples need a configured artifact repository, such as S3-compatible storage.

Control flow features are declared on steps and tasks. when runs a step only if an expression is true, for example comparing an earlier step's outputs.result. Loops come in three forms: withItems over a literal list, withParam over a JSON array, often produced by an earlier step, and withSequence over a range of numbers; loop iterations run in parallel. retryStrategy sets a limit, a retryPolicy of OnFailure (the default), OnError, OnTransientError or Always, and an exponential backoff. An exit handler named in spec.onExit always runs at the end, whether the workflow succeeded or not, and can read {{workflow.status}}, which is Succeeded, Failed or Error, to choose between cleanup and notifications.

Reuse is handled by templates stored in the cluster. A WorkflowTemplate is a namespaced workflow definition; another workflow calls one of its templates with templateRef from a steps or dag template, or starts from the whole definition with workflowTemplateRef, merging any arguments it passes. A ClusterWorkflowTemplate is the cluster-scoped equivalent, referenced with clusterScope: true. A CronWorkflow runs a workflow on a non-empty list of cron schedules, with a concurrencyPolicy of Allow (default), Forbid or Replace, an optional timezone, startingDeadlineSeconds for missed runs, suspend, and history limits of three successful and one failed workflow by default.

Key points

  • In steps, outer list items run in sequence and inner list items run in parallel.
  • A bare dependency name in depends means Succeeded, Skipped or Daemoned.
  • The default retryPolicy is OnFailure; Always retries on both failures and errors.
  • ClusterWorkflowTemplates are referenced with clusterScope: true in templateRef or workflowTemplateRef.

Three sample questions

14 CAPA questions on Argo Workflows, 14 with explanations. How practice works

Question 1

Which of the following best describes an Argo Workflow?
  1. A.A continuous delivery tool for Kubernetes
  2. B.A container-native workflow engine for orchestrating parallel jobs
  3. C.A progressive delivery controller
  4. D.An event-driven automation framework

Correct answer: B

Argo Workflows is specifically designed as a container-native workflow engine that orchestrates parallel jobs on Kubernetes.

Question 2

In an Argo Workflow template, what is the purpose of the outputs section?
  1. A.To define the workflow's exit conditions
  2. B.To specify the artifacts produced by the template
  3. C.To configure output logging
  4. D.To set environment variables

Correct answer: B

The outputs section in a template defines what artifacts the template produces, which can then be used by subsequent steps in the workflow.

Question 3

Which of the following YAML defines a valid DAG task dependency?
dag:
  tasks:
  - name: A
    template: process
  - name: B
    dependencies: [A]
    template: analyze
  1. A.The syntax is incorrect
  2. B.The syntax is correct and B will run after A
  3. C.The syntax is correct but missing required fields
  4. D.Dependencies should use "depends" instead of "dependencies"

Correct answer: B

The DAG syntax correctly shows task B depending on task A using the dependencies field.

Practice this topic

Focus mode keeps every question on Argo Workflows until you leave it. 10 free guest answers, then a free account; no credit card.

Or open CAPA practice across all topics.

Sources

The explanation above was checked against these official documents.

Frequently asked questions

What is the difference between a template and a WorkflowTemplate?

A template is one task definition inside the templates list of a Workflow, such as a container or dag template. A WorkflowTemplate is a separate namespaced resource that holds a whole reusable workflow definition with one or more templates.