Argo Workflows(1.7万星)2026:K8s原生流水线引擎,支持DAG与步骤执行

📘 教程 2026-08-06 约 5 分钟阅读

Argo Workflows(16,878星)是K8s原生的工作流引擎,用于运行容器化流水线——DAG、步骤和定时调度。本文教你部署并运行第一个工作流。

💡 你将学到

Argo Workflows(16,878星)是K8s原生的工作流引擎,用于运行容器化流水线——DAG、步骤和定时调度。本文教你部署并运行第一个工作流。

直接给结论

argoproj/argo-workflows(16,878星,Go)是一个Kubernetes开源工作流引擎。每个工作流步骤都是一个容器,流程用DAG或线性序列定义。它是K8s原生CI/CD、ML流水线和批处理的事实标准。

核心能力

部署并运行第一个工作流

# 安装控制器
kubectl create namespace argo
kubectl apply -n argo -f https://raw.githubusercontent.com/argoproj/argo-workflows/master/manifests/quick-start-postgres.yaml

# 安装CLI
curl -sLO https://github.com/argoproj/argo-workflows/releases/download/v3.6.2/argo-linux-amd64.gz
gunzip argo-linux-amd64.gz && chmod +x argo-linux-amd64 && sudo mv ./argo-linux-amd64 /usr/local/bin/argo

# 提交hello工作流
argo submit -n argo --watch https://raw.githubusercontent.com/argoproj/argo-workflows/master/examples/hello-world.yaml

示例:并行DAG

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: dag-
spec:
  entrypoint: main
  templates:
    - name: main
      dag:
        tasks:
          - name: build
            template: whalesay
          - name: test
            template: whalesay
            dependencies: [build]
          - name: deploy
            template: whalesay
            dependencies: [test]
    - name: whalesay
      container:
        image: docker/whalesay
        command: [cowsay, "hello"]

实用技巧

FAQ

需要Kubernetes吗? 需要——Argo Workflows跑在K8s上(minikube或真实集群)。

和Airflow比怎么样? Airflow(46,389星)以Python为中心、基于VM;Argo是容器原生、K8s原生。按你的平台选。

免费吗? 是——开源(Apache-2.0)。

相关文章
2026-06-29
高收益主线龙头策略——不花钱的数据,也能抓到龙头
2026-06-29
你笔记本里,藏着一个AI
2026-07-14
免费AI编程助手 2026 配置指南:VS Code 5分钟装 Continue、Copilot、Windsurf

💬 评论 (0)

暂无评论,来说两句吧~

登录后评论