Hello, is there a simple way in OSS Prefect v1 to ...
# prefect-community
r
Hello, is there a simple way in OSS Prefect v1 to set container images at the task level when using kubernetes executor? From my understanding the answer is no, but could be wrong. An example is a flow containing N tasks of native type, e.g. ShellTask/PythonTask, each relying on a (possibly) separate container image.
a
This post answers the same question for Docker container, but you can use the same flow-of-flows approach to run each task/process in a separate Kubernetes job Alternatively, Prefect also has Kubernetes tasks you could use for that purpose
r
Thanks. Right I see, so no way around duplication of pods from the looks of it.
a
can you elaborate re the duplication of pods?
r
in the sense that with the optimal scenario of task-level images, you spawn N + 1 pods (tasks + flow itself). With these other approaches externalising the tasks (as docker containers or subflows) you need additional pods to trigger and monitor. Not really problematic, just something for (myself) to be mindful about anyway
a
that's true, you're right about that. and this is actually a common question - I created a topic about it I wonder, are your tasks that different that each of them requires a completely separate environment? if so, then spinning up a flow of flows with the orchestrator pattern as shown in the above topic seems like a good approach. You have a parent flow that is something extra, but this parent flow can be seen as an orchestrator