Hi, new to running prefect in k8s. Anyone ever run...
# prefect-kubernetes
d
Hi, new to running prefect in k8s. Anyone ever run into this error on a k8 job spun up by a agent? No such file or directory: '/tmp/tm...... python3.9'... bblah blah.... The kubernetes job is referencing a virtual environment on my local. There is no reference to this env / python path in my deployment file or flow. I'm confused. Anyone know what's going on behind the scene? I have one repo with many flows. The entrypoint is directory qualified. Job image: prefecthq/prefect:2.14.5-python3.9 using git as storage deployment : prefect deployment build mypyfile.py:entrypointfunction -n k8_job_do_things -sb github/myrepo -i kubernetes-job --override env.EXTRA_PIP_PACKAGES="pandas SQLAlchemy"
n
hey @Don - if you're just getting started I would recommend using a k8s work pool / worker instead of the
KubernetesJob
infra block. Agents / block-based deployments will be deprecated at some point soon there are a couple steps to setup: • create a k8s work pool and run a worker that listens for work there (helm chart is easiest imo) • define deployments that reference that work pool via
prefect deploy
(not
prefect deployment build
) as for your actual error, it would be helpful to see the whole stack trace. however, I would recommend using workers instead