How can I run a cronjob on multiple nodes sequentially in kubernetes?

566 views Asked by At

I have two different types of worker nodes, ones that do data preparation and nodes that do machine learning.
I want to run a Cronjob that runs one process on a preparation node, then (only when finished) a second process on an ML node.
How can I do this in Kubernetes?

1

There are 1 answers

0
Jonas On

I want to run a Cronjob that runs one process on a preparation node, then (only when finished) a second process on an ML node.

A CronJob is only one Pod.

What you want to do here is a Workflow or Pipeline consisting of two pods, executed on different nodes.

This can be done with e.g. Argo Workflow or Kubeflow Pipelines or maybe Tekton Pipeline.