oleander-whirlwind
03/13/2026, 5:55 AMMarvin
03/13/2026, 5:56 AMMarvin
03/13/2026, 6:00 AM# dev
export PREFECT_API_URL="<https://prefect-dev.mycompany.com/api>"
# staging
export PREFECT_API_URL="<https://prefect-stg.mycompany.com/api>"
# prod
export PREFECT_API_URL="<https://prefect-prod.mycompany.com/api>"
- Create environment-specific work pools and run workers in each cluster:
prefect work-pool create dev-k8s --type kubernetes
prefect work-pool create stg-k8s --type kubernetes
prefect work-pool create prod-k8s --type kubernetes
# In each cluster/namespace:
prefect worker start -p dev-k8s --type kubernetes
prefect worker start -p stg-k8s --type kubernetes
prefect worker start -p prod-k8s --type kubernetes
Docs: Work pools, Workers. If you’re self-hosting and need HA, see Scale self-hosted Prefect.
What I typically recommend
- If you’re self-hosting and have prod in Kubernetes: run a dedicated Prefect Server for prod, and either
- a second server for dev+staging, or
- separate servers per env if you have compliance/strict isolation needs.
- If you’re on Prefect Cloud: one account, separate workspaces per env; use per-env work pools and per-cluster workers.
If you can share whether you’re on Cloud vs self-hosted and any isolation/compliance requirements, I can suggest a concrete layout (including Helm values or infra sketches) for dev, staging, and prod.