Is there analogue to multi-container K8s jobs in Prefect #19330
Unanswered
anton-daneyko-ultramarin
asked this question in
Q&A
Replies: 1 comment 2 replies
-
|
Hey @anton-daneyko-ultramarin! I haven't tried this myself, but you should be able to achieve this by modifying the base job template of a Kubernetes work pool. You can edit any aspect of the job manifest used to start the Kubernetes job that executes your flow, including adding additional containers to the job. If you think that will work for your use case, I can give an example base job template that uses multiple containers. If that doesn't seem like it would work, you could also look into adding an init container to your Prefect job that starts the third-party container before starting your flow container. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We currently use K8s to run a job that with two containers: one container with a third party service and the other one with our code that uses that third party service.
I wonder if this sort of setup would be possible and how exactly? We already use Prefect for some "crony" stuff, but this one seems different. My flow would need the access to the third party service, which I theoretically could start manually (using K8s API), but this does not merit the switch to Prefect, since right now the lifetime management of the third party service is taken care of by K8s job.
Beta Was this translation helpful? Give feedback.
All reactions