my prefect server setup
prefect-metrics.waow.tech
python
orchestration
this file is a set of notes for us:
- never use
piporuv pip— useuv add,uv sync, oruv run --with - use
jqfor JSON processing, not python - prefect docs are on disk at
~/github.com/prefecthq/prefect/docs— read before guessing - use justfile recipes instead of ad-hoc commands
- push to both remotes:
origin(tangled.org) andgithub(github mirror) - after server restart, re-fetch kubeconfig with
just kubeconfig - flow code never goes in worker images or ConfigMaps — it's pulled at runtime via
git_clone - worker image is
prefecthq/prefect:3-python3.14-kubernetes(the-kubernetestag matters; uv is pre-installed) PREFECT_INTEGRATIONS_KUBERNETES_OBSERVER_NAMESPACES=prefectis what makes namespace-scoped RBAC work- kubernetes work pool base job template defaults namespace to
default— must beprefect - flow pods install deps via
uv run --with 'my-prefect-server @ git+https://github.com/...'in thecommandjob variable — this creates an ephemeral venv before pull steps run - per-deployment overrides (e.g.
--python 3.13for dbt compat) go inwork_pool.job_variables.command, not at the deployment root - requires-python is >=3.13 (not 3.14) so the enrich flow can run dbt under python 3.13
- we maintain prefect-dbt — never suggest replacing PrefectDbtOrchestrator with subprocess calls