https://prefect.io logo
Title
o

Ofir

05/08/2023, 9:09 PM
Prefect on Kubernetes with nginx Ingress /prefect To answer my own question of how to run Prefect with nginx on Kubernetes (behind a /prefect ingress) here’s the recipe:
git clone git@github.com:PrefectHQ/prefect.git
cd prefect
git checkout 2.10.6
# edit Dockerfile to set `PREFECT_UI_SERVE_BASE=/prefect`
docker build --arg PYTHON_VERSION=3.10 -t prefect:base2.10.6-python3.10 -f Dockerfile  .
Then you need to inherit from this image for building the Prefect agent:
FROM prefect:base2.10.6-python3.10
RUN pip install -r requirements.txt
...
@justabill I think the Prefect dev team should probably introduce Docker arguments such that it is easier to achieve that without hacking the base image. I can elaborate more here or in DM.