Skip to content
gqlxj1987's Blog
Go back

Argo

Edit page

原repo

Argo is a robust workflow engine for Kubernetes that enables the implementation of each step in a workflow as a container. It provides simple, flexible mechanisms for specifying constraints between the steps in a workflow and artifact management for linking the output of any step as an input to subsequent steps

With Argo and Kubernetes, a user not only can create a “pipeline” for building an application, but the pipeline itself can be specified as code and built or upgraded using containers. In other words, you can use CI to manage your CI infrastructure :)

利用argo workflow形成这个?

parallel workflow

We create a Job object with 5 completions and 5 parallelism that will launch 5 pods in parallel to search for a solution. A Redis queue service is used for pubsub. The pod that finishes first will publish a message on a channel on the Redis server. All workers are subscribed to the channel. On receiving “finished” message, all other workers stop the search and exit

The workflow then consists of the following steps:

  1. Create a parallelized Kubernetes Job which launches 5 parallel workers. Once any pod has exited with success, no other pod will be doing any work. Return the job name and job uid as output parameters.
  2. Using the uid of the job, query any of its associated pods and print the result to the stdout.
  3. Delete the job using the job name.

Edit page
Share this post on:

Previous Post
k8s 概念Intro
Next Post
不做错