Search

Argo Workflow

참고
ARGO_OS="linux" curl -sLO "https://github.com/argoproj/argo-workflows/releases/download/v3.6.10/argo-$ARGO_OS-amd64.gz" gunzip "argo-$ARGO_OS-amd64.gz" chmod +x "argo-$ARGO_OS-amd64" sudo mv "./argo-$ARGO_OS-amd64" /usr/local/bin/argo argo version
Shell
복사
ARGO_WORKFLOWS_VERSION="v3.6.10" kubectl create namespace argo kubectl apply -n argo -f "https://github.com/argoproj/argo-workflows/releases/download/${ARGO_WORKFLOWS_VERSION}/quick-start-minimal.yaml"
Shell
복사
argo submit -n argo --watch https://raw.githubusercontent.com/argoproj/argo-workflows/main/examples/hello-world.yaml
Shell
복사
argo list -n argo
Shell
복사
argo delete <Argo Workflow Name> -n argo
Shell
복사
argo delete --all -n argo
Shell
복사
workflow step
apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: argo-workflowtaskresults-role namespace: default rules: - apiGroups: ["argoproj.io"] resources: ["workflowtaskresults"] verbs: ["create", "get", "list", "watch", "update", "patch", "delete"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: argo-workflowtaskresults-binding namespace: default subjects: - kind: ServiceAccount name: default namespace: default roleRef: kind: Role name: argo-workflowtaskresults-role apiGroup: rbac.authorization.k8s.io
YAML
복사
kubectl apply -f rbac.yaml
Shell
복사
apiVersion: argoproj.io/v1alpha1 kind: Workflow metadata: generateName: hello-world- spec: entrypoint: main templates: - name: main steps: - - name: step-1 template: echo-hello - - name: step-2 template: echo-complete - name: echo-hello container: image: alpine command: [sh, -c] args: ["echo 'Hello, Argo!'"] - name: echo-complete container: image: alpine command: [sh, -c] args: ["echo 'Workflow Completed!'"]
YAML
복사
kubectl create -f workflow.yaml
Shell
복사