Dear Prefect-Community, My Senior send me here to politely ask if it is possible to map prefect-tas...
r
Dear Prefect-Community, My Senior send me here to politely ask if it is possible to map prefect-task to individual kubernetes pods instead of paralell python-tasks. :)
k
Hi @Rouven, you can map over the RunNamespacedJob
r
@Kevin Kho appreciate the fast response!! Are you able to provide an example? πŸ™‚
k
It would be:
Copy code
run = RunNamespacedJob(..)
with Flow(..) as flow:
    run.map(body=...)
Where
body
will be a list of dicts.
r
Ah! Thank you @Kevin Kho. Keep up the good work and profile picture! πŸ˜›
marvin 1
πŸ‘ 1
k
If your tasks are not k8s jobs, then you would use dask_kubernetes to make a Dask cluster that creates multiple pods, and then you would map over that cluster.
But it’s not 1 task to 1 pod