https://prefect.io logo
c

Chandrashekar Althati

08/11/2022, 4:46 PM
Hi all, I am new to Prefect. We are planning to use prefect cloud for orchestrating our workloads. For execution environment, we are planning to go on AKS in long term. But for short term, we would like to run the flows as containerized applications on Azure. But my question is, which of the following Azure container options best suites for running the Prefect flows as containers. 1. Azure Container Apps , 2. Azure Container Instances, 3. Azure Functions. Find the attached image. We would like to replace the AKS in the diagram with one of the above three Azure container options.

https://infinitelambda.com/wp-content/uploads/2021/02/prefect-steps-2048x643.png

c

Chris Reuter

08/11/2022, 6:57 PM
@Christopher Boyd may have some insight here given he's our resident Azure pro
🙏 1
c

Christopher Boyd

08/11/2022, 9:00 PM
Hi @Chandan Purbia - of those, I’d probably run with Azure Container instances which is most arguably relatable to AWS Fargate, and probably the best suited as a replacement
Ideally, I’ve done quite a bit with AKS and prefer that, that ACI is probably your next best bet there
c

Chandrashekar Althati

08/22/2022, 9:46 PM
Hi @Christopher Boyd: Thank you for your inputs. I was successfully able to onboard prefect on to Azure container apps and connect to Prefect cloud. Since the resource limits are 4 gb and 2 cpu for Azure container apps, I moved to Azure Container Instance. I was also successful in deploying prefect in ACI and connect to Prefect cloud. But agaian the resource limits for ACI are cpu=4 cpu and memory = 16 GB. Because of this limits, now I am trying AKS. I created an AKS. I am trying to deploy Prefect 2.0 agent on to AKS. But there is no good document to do this for Prefect 2.0 . I looked at this article of you: https://discourse.prefect.io/t/how-to-deploy-a-prefect-2-0-agent-to-an-azure-kubernetes-cluster-and-connect-to-azure-blob-storage/1128. I can't use S3 block and I can use only azure blocks. And I would like to have the prefect agent connect to Prefect Cloud and not to the local Orion. Do you have any latest document that I can use to setup Prefect 2.0 agent on AKS and integrate with Prefect Cloud. This would be a great help.
c

Christopher Boyd

08/22/2022, 10:34 PM
Hi @Chandrashekar Althati - there should be plenty of good docs and videos for this - I should know, as I helped create them 🙂 Try these out: https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbnFHRlR[…]2Fdeploying-prefect-agents-on-kubernetes%2F1298&v=QBLcLXulR9w

https://www.youtube.com/watch?v=m9FYoOIfWMc

https://www.youtube.com/watch?v=WG9qphVJ028

https://www.youtube.com/watch?v=QBLcLXulR9w

I’m not quite sure of your exact case hence the slew of links - you should only need the right one for what you are trying to do, above is a list of setting up infra, setting up a basic agent in AKS, and setting up an agent in AKS pointing to cloud, so one of those should be what you need 🙂
c

Chandrashekar Althati

08/22/2022, 10:57 PM
Thanks for Sharing these links Chris. My requirement is to log into Prefect cloud and run my flows. the flow runs should run on my AKS with auto scale up/down. I have AKS, Azure storage account, Prefect cloud account(with API key and API URL). So basically the prefect agent should be up and running in my AKS and serve all the flow run requests coming in from the work queue of my prefect cloud.
I will go through your videos and I will try to achieve my requirements. Thanks again.
c

Christopher Boyd

08/22/2022, 10:59 PM
Yup, then you should just need the short one , connecting agent to cloud api
Just ensure you get your api url right, there is small oversight in that video that shows app.prefect and should be api.prefect - it helps to have your url at the ready once you get there
3 Views