Hi, I would like to use a custom image from my pri...
# prefect-community
Hi, I would like to use a custom image from my private image registry to run a flow on my kubernetes flow runner (orion). How can I provide credentials for this?
Great question, I'd assume if the registry supports environment variables, perhaps this way? otherwise, Kubernetes secret may be worth trying
@Anna Geller I resorted to using a public image, which I pass to the KubernetesFlowRunner constructor. However, when running my flow I still get "no module named pandas", while it should be installed in my docker image
Although someone should most probably add the imagePullSecrets config here https://github.com/PrefectHQ/prefect/blob/cb8aa4f255f4c8207979d5d970da461674451956/src/prefect/flow_runners.py#L985 As my workaround has some limitations (i.e. you can have only one private registry)
@Mathijs Carlu could you share how your Dockerfile looks like? Did you rebuild the image and pushed it to your registry?
@Mateo Merlo, Dockerfile looks like this:
FROM prefecthq/prefect:2.0b3-python3.8
RUN pip install pandas
I made a kubernetes secret with credentials to an azurecontainerregistry as pointed out above, but using image={imagename} does not work. I however also pushed the image to a public container registry (docker.io/mathijsc/indumation-pandas:latest), which DOES work since I have patched the sa and created the secret. This doesn't make sense at all to me, as it points to another registry
And did you point in to this image on your KubernetesRun config inside the flow?
I set my image in the KubernetesFlowRunner which is specified in the DeploymentSpec
perhaps trying to set image_pull_policy="Always"? to be sure that is always using the latest version of the image
🙌 1