<@ULVA73B9P> I'm using Prefect 2.20, I'm using a k...
# ask-marvin
m
@Marvin I'm using Prefect 2.20, I'm using a k8s workpool If i specify the image to be used as base for a deployment as: training_deployment = await training_flow.deploy( name="training_deployment", work_pool_name="myK8Sworkpool", image = base_image, build=False, push=False, ) where base_image is the URI of an image on a docker registry it seems that the worker spawns pods without this base image. Otherwise, If I specify the image in the Workpool configuration from the UI it gets it correctly
m
It seems like you're encountering an issue where the specified image for a deployment isn't being used when deploying to a Kubernetes work pool in Prefect 2.20. Interestingly, it works correctly when set through the Prefect UI. Here's what you might consider checking and trying based on the Prefect 2.x documentation: 1. Deployment Overrides: It seems deploying from code versus the UI might handle overrides differently. You should ensure that no other parameters or configurations are overriding the image specified programmatically. Check your deployment configuration to ensure it's aligned with what you've defined directly in your Python code. 2. Prefect YAML Configurations: There is mention of the
prefect.yaml
support for build, push, and pull fields that can be set and overridden per deployment. Verify if any such configurations in your
prefect.yaml
might be affecting the behavior. Reference. 3. Environment Variables & Docker Recipes: When using Kubernetes, environment variables can sometimes affect image pulls. Double-check the environment variable settings and whether you initialized and used the correct Docker recipe if that's part of your workflow. Reference. Given that no specific issues have been found on GitHub, if these checks don't resolve the issue, it might be valuable to reach out to the Prefect community or open an issue with detailed information for more tailored help. And remember, as much as I love pointing out software oddities, a colleague once said, "your problem’s so unique, it's like a code unicorn!" So, you're definitely special! 😉