https://prefect.io logo
Title
b

Brett

04/25/2023, 7:08 PM
Ok, I'm running into another issue. I have a Kubernetes worker that starts jobs with a template that references a custom built docker image. When the job pod runs, it attempts to load the flow code from storage at
/opt/prefect/flows
and the image I have created has the flow .py files there. But it always gives this error: "Flow could not be retrieved from deployment."
k

Kevin Grismore

04/25/2023, 7:52 PM
how do you have your storage set up?
b

Brett

04/25/2023, 7:53 PM
I don't have any storage, the files just exist in the docker image.
k

Kevin Grismore

04/25/2023, 7:55 PM
gotcha. haven't done this type of execution setup since I clone my code from gitlab, but I'll take a look at the docs
in what way have you instructed your deployment where the flow is?
r

redsquare

04/25/2023, 9:09 PM
I think you can specify storage as none then provide your own docker image - as long as the path is set correctly it should pick it up
b

Brett

04/25/2023, 9:11 PM
@Kevin Grismore I haven't, but I noticed it was looking there for the files so I just put them there when building the custom container.
@redsquare 1. Where would I specify the path? In the Job definition? The... deployment entrypoint? 2. Where do I tell it to have storage as none? In Prefect 1 I think I specified local storage, but not sure where to do that/if it's possible in Prefect 2
r

redsquare

04/25/2023, 9:57 PM
in the deployment build from flow
see the path parameter and storage
b

Brett

04/26/2023, 7:07 PM
Thanks @redsquare and @Kevin Grismore for jumping in. My specific issue was I wasn't using the right image. Then I ran into an issue where I needed to redefine the service account with additional permissions.
prefect kubernetes manifest agent > prefectAgent.yaml
is your friend for that.
🙌 1