Hi guys. When I build and apply a deployment I'm g...
# prefect-community
t
Hi guys. When I build and apply a deployment I'm getting error below. Storage block is not set, thus local storage is used. Infra block specifies k8s cluster and an agent works in there, so basically I want to run a flow from my local storage in k8s cluster specified by infra block. Any idea?:
1
r
local storage is not supported for Kubernetes Jobs
🙌 1
t
@redsquare thanks
Is docker storage supported for k8s jobs to pull image from a registry and run as a job?
r
Interesting - perhaps you could fool it by setting ignore storage and setting the path to the location in the docker image https://github.com/PrefectHQ/prefect/blob/main/src/prefect/deployments.py#LL156C9-L156C27
t
@redsquare so Docker storage is not supported anymore by default?
r
it is but not sure if you use your own docker image within a k8s job->pod - does it expect the storage to come remotely
t
yeah it was how we use Prefect 1
r
looks like it will be find if you set ignore_storage - will just use the path for the flow
t
okay, thanks @redsquare 🙏
r
wonder if you could set that, attach a volume by a patch in a customization for the k8s job it would work
👍 1
t
I just wonder if flow code doesn't come from remote, but embedded in builtin image. May I use this image as the image for infra block to execute flows? Thanks in advance. 🙏
r
I have not tried but see no reason for a limitation here to allow you to run a custom docker image in a k8s job and reading the flow from the image
If you set the ignore storage to true
you should be able to store the flows on a volume in k8s and have the pod mount the volume+exxecute the flow
t
I see thank you, we'll give it a try, our main issue is we have quite heavy initialization so we want to use our custom image
r
feels a pain to build and publish a new image everytime a flow changes
or you add a new one
t
yeah
so it looks like using custom image as execution environment but getting flows from some storage is better
r
100%
t
I'll try using custom image as infra block image, and also a storage maybe s3 or remote git repo
r
we use k8s with s3 storage - works great
t
your pods are also using a custom image?
or prefects own image
r
currently prefects own until we are sure about common requirements across all flows - then we will create a custom image - but only when that is clear
time for the flow to run is not uber critical for us currently - so we have lots of pip installs
lots = 5-15
t
I see, sounds good
ML dependencies are a bit problem, libraries are heavy
r
yeah, we are light on ML but use MindsDB on top of Clickhouse currently
t
oh interesting
I know it but didn't find any occasion to use 🙂
r
click or minds:)
t
MindsDB, have no idea on click 😄
r
They are both great, clickhouse especially
t
yeah, mindsdb look very interesting, I'll take a look to other