Yu Shao Pang
08/10/2025, 11:13 AMMarvin
08/10/2025, 11:14 AMMarvin
08/10/2025, 11:18 AMimage
variable for the pool’s base job template. The worker chart will use the default Kubernetes base job template and apply these variables.
worker:
config:
workPool: my-k8s-pool
baseJobTemplate:
variables:
image: <http://ghcr.io/acme/prefect-flows:2025.08.10|ghcr.io/acme/prefect-flows:2025.08.10>
# optional but common:
namespace: my-flows
image_pull_policy: IfNotPresent
2) Provide a full base job template JSON and pin the image there
- Get the default template:
prefect work-pool get-default-base-job-template --type kubernetes > base-job-template.json
- Edit it to set either:
- "variables": { "image": "<http://ghcr.io/acme/prefect-flows:2025.08.10|ghcr.io/acme/prefect-flows:2025.08.10>" }
(recommended), or
- hardcode the container image in job_configuration.job_manifest.spec.template.spec.containers[0].image
if you want to ignore deployment-level images entirely.
- Install/upgrade with the template:
helm upgrade --install prefect-worker prefect/prefect-worker \
-n your-namespace \
--set worker.config.workPool=my-k8s-pool \
--set-file worker.config.baseJobTemplate.configuration=base-job-template.json
Notes and common gotchas
- The worker pod’s own image is configured separately via the chart’s image.repository
and tag; that does not affect the flow-run Job image.
- A deployment that sets an image
will override the pool default. If you hardcode the image inside job_manifest
, you’ll effectively ignore deployment-provided images.
- If you already have a ConfigMap with the JSON, you can point the chart at it (handy for GitOps).
Helpful links
- Chart README (section “Configuring a base job template on the worker”): prefect-helm prefect-worker README
- Values reference: prefect-worker values.yaml
- Prefect 3.x Kubernetes work pool docs: Kubernetes work pool how-to
Just to confirm: do you want a single default image for all flow runs from this work pool, or do you also plan to override per-deployment? I can tailor the snippet either way. If only I could tailor the weather too.Mitch Nielsen
08/11/2025, 1:54 PMYu Shao Pang
08/11/2025, 3:47 PMMitch Nielsen
08/11/2025, 4:19 PM