https://prefect.io logo
#prefect-getting-started
Title
# prefect-getting-started
p

Pat

05/08/2023, 6:05 PM
Hey all! New to Prefect, love the product, and I have (what I hope is) an easy question about setup. Many thanks in advance! I have Perfect Server and a Prefect Agent running in a k8s cluster. I have a single git repo that houses all of my Flow code. The git repo has a pipeline that bakes all Flows/dependencies into a docker image then pushes that image to a registry. So far so good. After I run my build pipeline and create a new image with all updated Flows bundled in it, I think I need to update the Agent to tell it which image to pull when running a
KubernetesJob
- does that sound accurate? This is my first foray into Prefect and kubernetes so I may be conflating several technologies 😂
1
n

Nate

05/08/2023, 6:13 PM
hi @Pat - sounds like you're well on your way!! if you're using the
KubernetesJob
infra block, then you can specify an `image` (your custom image uri) on your block, which will be pulled by the agent (according to the pull policy on the block) when it submits the flow run to your cluster - with that, you should be good to go! -- worth mentioning that if you're just getting started, it might be worth checking out Projects and Work Pools / Workers - which allow for greater / more declarative configuration of your runtime environment (and bypasses the need to specify an infra block for deployments)
p

Pat

05/08/2023, 6:28 PM
Appreciate this @Nate!! I think I was getting hung up on how to programmatically update the Infrastructure Block (which looks like it's easy to do via the SDK in that first link you posted). Thanks again!
n

Nate

05/08/2023, 6:29 PM
sure thing - let us know if you encounter any other hang ups!
3 Views