I'm trying testing prefect server and prefect agen...
# prefect-community
p
I'm trying testing prefect server and prefect agents within local kubernetes on my machine. I have all pods up and running and submitting job to kubernetes agent. However, I'm getting
Kubernetes Error: Back-off pulling image "4988c227fd72"
error when I want to pull an image I built on my local docker. I'm passing the image ID in the environment of graphql call
"metadata": {"image": "4988c227fd72"}
. Any idea why my local kuberenetes agent can't pull a local image?
d
Hey @Payam Vaezi! Mind sharing your environment & storage setup code here?
p
Storage:
Copy code
'storage': {'key': '123456789/123456789.prefect', 'secrets': [], 'flows': {'123456789': '123456789/123456789.prefect'}, 'client_options': None, 'bucket': 'this_is_my_bucket', 'stored_as_script': False, '__version__': '0.13.15', 'type': 'S3'}
Environment:
Copy code
'environment': {'metadata': {'image': '4988c227fd72'}, 'labels': ['myagent'], '__version__': '0.13.15', 'type': 'LocalEnvironment'}
d
🧐
Looks like you may need to tell kubernetes to look in your local docker registry. I just found a Medium post that might help: https://medium.com/swlh/how-to-run-locally-built-docker-images-in-kubernetes-b28fbc32cc1d
p
Thanks for sharing, will check it out. I noticed when I tag my image and reference the tag this error doesn't happen. Still not sure why!
d
Looks like there’s also a
local_image
argument for Docker storage
I’m not sure if it’s relevant but it came up in another thread today, so wanted to share just in case
p
Interesting, I'll give that a try. Anyway, tagging image works and referring the image tag works well.