Slackbot
08/28/2025, 2:23 PMMarvin
08/28/2025, 2:23 PMMarvin
08/28/2025, 2:32 PMwork_queue_name
and/or tags rather than multiple pools.
How to control the pool explicitly in YAML
Make sure each deployment has the work_pool.name
set to the pool you want:
deployments:
- name: my-deployment
entrypoint: flows/my_flow.py:my_flow
work_pool:
name: prod-kubernetes # <- set the intended pool here
work_queue_name: "" # optional
job_variables: {} # optional
Then redeploy:
prefect deploy
How to verify what’s set on the server
prefect deployment inspect "<flow-name>/<deployment-name>"
Programmatic alternative (no YAML):
from prefect import Flow
flow = Flow.from_source(".", "flows/my_flow.py:my_flow")
flow.deploy(
name="my-deployment",
work_pool_name="prod-kubernetes",
)
A couple of clarifying questions so I can guide you precisely:
- Are you trying to have one deployment picked up by multiple pools, or do you just want to switch the deployment to a different pool?
- Can you share the work_pool:
section of your deployment YAML and your Prefect version?
References
- Managing work pools in Prefect 3