This message was deleted.
# ask-community
s
This message was deleted.
m
thought for 499.7 seconds
Thanks for the details — a couple of important points about Prefect 3.x deployments and work pools: - A deployment can target exactly one work pool. Deployments cannot be assigned to multiple pools, and they cannot have “no pool”. - Because a work pool is required, Prefect will ensure one is set. If your YAML omits it, Prefect will typically pick a pool (often a “default”/process pool) during deploy — which is why you’re seeing a pool get auto-added. What you can do instead - If you want the same flow to be runnable by different pools, create multiple deployments (one per pool), e.g. “my-flow-k8s” and “my-flow-ecs”. - If you’re trying to route within the same pool, use
work_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:
Copy code
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:
Copy code
prefect deploy
How to verify what’s set on the server
Copy code
prefect deployment inspect "<flow-name>/<deployment-name>"
Programmatic alternative (no YAML):
Copy code
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