https://prefect.io logo
Title
a

Anthony

12/07/2022, 3:41 AM
So our DevOps team has implemented Prefect 2.0 on Kubernetes. How do I go about connecting to the Kubernetes cluster to build and deploy prefect code?
1
k

Kalise Richmond

12/07/2022, 3:50 AM
Hi Anthony, a couple questions. Have they implemented a self hosted version of the UI? Is there an agent running in kubernetes? Generally for Prefect Cloud, once you have a flow working locally, the next steps is to create a deployment. Deployments will allow you to schedule your flow to a specific work queue and define where your code should be stored and how it should run(which type of infrastructure you will use). In your case, you will want to use a Kubernetes infrastructure block when you define your deployment. The work queue will correlate to an Agent that will live in your execution environment and will poll for scheduled flow runs.
a

Anthony

12/07/2022, 3:54 AM
Yes it is a self hosted environment and the agent is running in kubernetes.
I'm just not sure how to connect to the kubernetes environment to run a getting started prefect file. Is there something that I need to install locally to be able to connect to prefect?
k

Kalise Richmond

12/07/2022, 4:02 AM
Ah ok. So you need to install Prefect locally, and then you will want to set up your prefect config to connect to use the Orion API.
Installing Prefect will allow you to build and test your flow code locally as well.
a

Anthony

12/07/2022, 4:03 AM
Excellent, thank you very much!
k

Kalise Richmond

12/07/2022, 4:05 AM
Once you connect your config settings, I recommend running a simple hello world flow locally, then navigating the self hosted UI. You should be able to see your flow run in the UI Flow Runs page to verify you are connected. From there build out your flows, create deployments, and you should be all set. Make sure to check out our collections and blocks. 😄
a

Anthony

12/07/2022, 4:06 AM
Thanks!