Robert
01/08/2025, 4:02 PMMarvin
01/08/2025, 4:03 PMyaml
template:
metadata:
labels:
flow: your-flow-name
spec:
containers:
- name: flow-container
image: your-docker-image:latest
imagePullPolicy: IfNotPresent
3. Deploy the Manifest: Apply this configuration using Kubernetes:
bash
kubectl apply -f your-deployment-manifest.yaml
4. Set Environment Variables: Ensure that your environment variables, like PREFECT_API_URL
, are correctly set if you're using Prefect Server.
For more details, you can refer to the Prefect Docker Integration Guide.Robert
01/08/2025, 4:04 PMRobert
01/08/2025, 4:04 PMMarvin
01/08/2025, 4:04 PM--job-variable
flag to pass in the image URL when running a deployment from the command line. For example:
bash
prefect deployment run \
--id "your-deployment-id" \
--job-variable image="your-registry/your-image:tag"
3. Deployment Script: You can also specify the image directly in the deployment script using the job_variables
parameter:
python
if __name__ == "__main__":
your_flow.deploy(
name="your-deployment-name",
work_pool_name="your-work-pool",
job_variables={"image": "your-registry/your-image:tag"},
)
4. UI Configuration: If you're using the Prefect UI, you can input the image URL in the additional options under job variables.
For more detailed guidance, refer to the Prefect documentation on overriding job variables.Robert
01/08/2025, 4:06 PMMarvin
01/08/2025, 4:06 PMimage
. You can use this variable to set the image URL in your deployment configuration.Robert
01/08/2025, 7:12 PMMarvin
01/08/2025, 7:12 PM