|
| 1 | +--- |
| 2 | +title: "Run An Argo Workflow" |
| 3 | +date: 2025-01-23 |
| 4 | +weight: 3 |
| 5 | +description: > |
| 6 | + Integrate Kueue with Argo Workflows. |
| 7 | +--- |
| 8 | + |
| 9 | +This page shows how to leverage Kueue's scheduling and resource management capabilities when running [Argo Workflows](https://argo-workflows.readthedocs.io/en/latest/). |
| 10 | + |
| 11 | +This guide is for [batch users](/docs/tasks#batch-user) that have a basic understanding of Kueue. For more information, see [Kueue's overview](/docs/overview). |
| 12 | + |
| 13 | +Currently Kueue doesn't support Argo Workflows [Workflow](https://argo-workflows.readthedocs.io/en/latest/workflow-concepts/) resources directly, |
| 14 | +but you can take advantage of the ability for Kueue to [manage plain pods](/docs/tasks/run_plain_pods) to integrate them. |
| 15 | + |
| 16 | +## Before you begin |
| 17 | + |
| 18 | +1. Learn how to [install Kueue with a custom manager configuration](/docs/installation/#install-a-custom-configured-released-version). |
| 19 | + |
| 20 | +2. Follow steps in [Run Plain Pods](/docs/tasks/run/plain_pods/#before-you-begin) |
| 21 | +to learn how to enable and configure the `v1/pod` integration. |
| 22 | + |
| 23 | +3. Install [Argo Workflows](https://argo-workflows.readthedocs.io/en/latest/installation/#installation) |
| 24 | + |
| 25 | +## Workflow definition |
| 26 | + |
| 27 | +### a. Targeting a single LocalQueue |
| 28 | + |
| 29 | +If you want the entire workflow to target a single [local queue](/docs/concepts/local_queue), |
| 30 | +it should be specified in the `spec.podMetadata` section of the Workflow configuration. |
| 31 | + |
| 32 | +{{< include "examples/pod-based-workloads/workflow-single-queue.yaml" "yaml" >}} |
| 33 | + |
| 34 | +### b. Targeting a different LocalQueue per template |
| 35 | + |
| 36 | +If prefer to target a different [local queue](/docs/concepts/local_queue) for each step of your Workflow, |
| 37 | +you can define the queue in the `spec.templates[].metadata` section of the Workflow configuration. |
| 38 | + |
| 39 | +In this example `hello1` and `hello2a` will target `user-queue` and `hello2b` will |
| 40 | +target `user-queue-2`. |
| 41 | + |
| 42 | +{{< include "examples/pod-based-workloads/workflow-queue-per-template.yaml" "yaml" >}} |
| 43 | + |
| 44 | +### c. Limitations |
| 45 | + |
| 46 | +- Kueue will only manage pods created by Argo Workflows. It does not manage the Argo Workflows resources in any way. |
| 47 | +- Each pod in a Workflow will create a new Workload resource and must wait for admission by Kueue. |
| 48 | +- There is no way to ensure that a Workflow will complete before it is started. If one step of a multi-step Workflow does not have |
| 49 | +available quota, Argo Workflows will run all previous steps and then wait for quota to become available. |
| 50 | +- Kueue does not understand Argo Workflows `suspend` flag and will not manage it. |
| 51 | +- Kueue does not manage `suspend`, `http`, or `resource` template types since they do not create pods. |
0 commit comments