Tutorial: Argo Workflows
If you have not done so already: Before beginning this tutorial, download the Kubeflow tutorials zip file, which contains sample files for all of the included Kubeflow tutorials.
This article provides the following two examples:
Simple Workflow
To complete the simple workflow:
- Upload
argo-hello-world.yaml
orargo-hello-world_limit.yaml
:- If you are running in a profile
namespace:
kubectl apply -f argo-hello-world.yaml -n <namespace>
- If you are running in a tenant
namespace:
kubectl apply -f argo-hello-world_limit.yaml -n <tenant_namespace>
- If you are running in a profile
namespace:
- Check if the workflow is
created:
kubectl get wf -n <namespace>
- Verify the relative pod
hello-world
is created and running. - To remove the workflow, enter the following
command:
kubectl delete wf hello-world -n <namespace>
Parallel Execution Workflow
To complete the parallel execution workflow:
- Upload
argo-parallel-nested.yaml
orargo-parallel-nested_limit.yaml
and apply the nested Argo workflow:- If you are using the user
namespace:
kubectl apply -f argo-parallel-nested.yaml -n <namespace>
- If you are using the tenant
namespace:
kubectl apply -f argo-parallel-nested_limit.yaml -n <tenant_namespace>
- If you are using the user
namespace:
- Check that the pods are created per the template in the
.yaml
file. - The workflow is successfully
completed:
parallelism-nested-dag-122631356 0/2 Completed 0 4m36s parallelism-nested-dag-139408975 0/2 Completed 0 4m36s parallelism-nested-dag-172964213 0/2 Completed 0 4m52s parallelism-nested-dag-1858975680 0/2 Completed 0 4m19s parallelism-nested-dag-1892530918 0/2 Completed 0 4m3s parallelism-nested-dag-1909308537 0/2 Completed 0 4m3s parallelism-nested-dag-2922067776 0/2 Completed 0 2m56s parallelism-nested-dag-2938845395 0/2 Completed 0 2m56s parallelism-nested-dag-2972400633 0/2 Completed 0 3m12s parallelism-nested-dag-3470313907 0/2 Completed 0 4m19s parallelism-nested-dag-3487091526 0/2 Completed 0 4m4s parallelism-nested-dag-3503869145 0/2 Completed 0 4m4s parallelism-nested-dag-458928436 0/2 Completed 0 3m30s parallelism-nested-dag-475706055 0/2 Completed 0 3m30s parallelism-nested-dag-492483674 0/2 Completed 0 3m46s
- Remove the workflow with the following
command:
kubectl delete wf parallelism-nested-dag -n <namespace>