Vladislav Rumjantsev
11/19/2024, 5:41 PMBianca Hoch
11/20/2024, 3:30 PMBianca Hoch
11/20/2024, 3:35 PMVladislav Rumjantsev
11/20/2024, 3:36 PMGKEStartPodOperator
or KubernetesPodOperator
.
Using k8s worker i'd like to run a pod with custom image(non prefect/python), but i'd like prefect to monitor this pod for a status(successful/failed run, running, etc)Vladislav Rumjantsev
11/20/2024, 5:20 PMAre you trying to have a parent flow that is running in one pod kick off a new pod with a custom image to run a child/downstream flow?yes, running a new pod with a custom image as a part of the flow
staticnotdynamic
11/23/2024, 11:37 AMFROM prefecthq/prefect:2.14.11-python3.10
# Do something custom
COPY requirements.txt .
RUN pip install -r requirements.txt
Next, point your k8s worker to pull this image. Now any new pods using this worker will communicate normally with the prefect API and appear in the prefect UI as usualVladislav Rumjantsev
11/24/2024, 3:28 PMstaticnotdynamic
11/24/2024, 3:35 PMstaticnotdynamic
11/24/2024, 3:36 PMVladislav Rumjantsev
11/24/2024, 3:37 PMVladislav Rumjantsev
11/24/2024, 3:40 PMIf you are using Kuberentes, you can define it as a Kubernetes job. Ultimately if you are using any container orchestrator I am sure there's a mechanism to watch for jobs.yeah, but i have to first prepare the data, and after processing i have another steps, so i prefer orchestrating it using a single solution, to have a better observability and control over the whole pipeline
staticnotdynamic
11/24/2024, 3:41 PM