Argo

Batch jobs with argo

This page provides steps for installing argo.


Installation of Argo

We suggest to install argo in line with the argo instructions. At the time of writing these are:

kubectl create namespace argo
kubectl apply -n argo -f https://raw.githubusercontent.com/argoproj/argo/stable/manifests/install.yaml

Per Namespace Setup

If you intend to use Batch jobs on the namespace then you’ll need to create a service account for this:

kubectl apply -n ${namespace} -f - <<EOF
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: workflow
rules:
- apiGroups:
  - ""
  resources:
  - pods
  verbs:
  - "*"
- apiGroups:
  - "apps"
  resources:
  - deployments
  verbs:
  - "*"
- apiGroups:
  - ""
  resources:
  - pods/log
  verbs:
  - "*"
- apiGroups:
  - machinelearning.seldon.io
  resources:
  - "*"
  verbs:
  - "*"
EOF

kubectl create -n ${namespace} serviceaccount workflow

kubectl create rolebinding -n ${namespace} workflow --role=workflow --serviceaccount=${namespace}:workflow

And also configure a secret for batch jobs to communicate with S3 or minio (here assumed to be in minio-system namespace):

kubectl apply -n ${namespace} -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
  name: seldon-job-secret
type: Opaque
stringData:
  AWS_ACCESS_KEY_ID: ${MINIOUSER}
  AWS_SECRET_ACCESS_KEY: ${MINIOPASSWORD}
  AWS_ENDPOINT_URL: http://minio.minio-system.svc.cluster.local:9000
  USE_SSL: "false"
EOF
Last modified November 20, 2020: fix slip in rolebinding (7eff0c9)