<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Devops Pilot</title>
    <description>The latest articles on DEV Community by Devops Pilot (@devopspilot).</description>
    <link>https://dev.to/devopspilot</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3783550%2F29e4eea2-54a2-4574-b640-793c26f631b6.png</url>
      <title>DEV Community: Devops Pilot</title>
      <link>https://dev.to/devopspilot</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devopspilot"/>
    <language>en</language>
    <item>
      <title>Deploying Prefect Workflows on Cloud Run with Cloud SQL (Production-Ready GCP Setup)</title>
      <dc:creator>Devops Pilot</dc:creator>
      <pubDate>Sat, 21 Feb 2026 06:58:39 +0000</pubDate>
      <link>https://dev.to/devopspilot/deploying-prefect-workflows-on-cloud-run-with-cloud-sql-production-ready-gcp-setup-57a2</link>
      <guid>https://dev.to/devopspilot/deploying-prefect-workflows-on-cloud-run-with-cloud-sql-production-ready-gcp-setup-57a2</guid>
      <description>&lt;p&gt;If you're running data workflows and don’t want to manage Kubernetes, this architecture might help.&lt;/p&gt;

&lt;p&gt;In this project, I built a production-ready workflow system using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prefect for orchestration 🔄&lt;/li&gt;
&lt;li&gt;Cloud Run for serverless container execution 🚀&lt;/li&gt;
&lt;li&gt;Cloud SQL (PostgreSQL) for metadata storage 🗄️&lt;/li&gt;
&lt;li&gt;IAM-based authentication between services 🔐&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🏗️ Architecture Overview&lt;/p&gt;

&lt;p&gt;Prefect Agent → Cloud Run Container → Cloud SQL (Private IP)&lt;/p&gt;

&lt;p&gt;Why this approach works well:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fully serverless compute ⚡&lt;/li&gt;
&lt;li&gt;Auto scaling&lt;/li&gt;
&lt;li&gt;No VM maintenance&lt;/li&gt;
&lt;li&gt;Secure database connectivity&lt;/li&gt;
&lt;li&gt;Clean separation of orchestration and execution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🛠️ Key Implementation Steps&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create Cloud SQL instance (Private IP)&lt;/li&gt;
&lt;li&gt;Build Docker image for Prefect flow&lt;/li&gt;
&lt;li&gt;Push image to Artifact Registry&lt;/li&gt;
&lt;li&gt;Deploy to Cloud Run&lt;/li&gt;
&lt;li&gt;Configure IAM roles properly&lt;/li&gt;
&lt;li&gt;Connect Cloud Run to Cloud SQL&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;⚠️ Common Mistakes&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Forgetting Cloud SQL Auth Proxy&lt;/li&gt;
&lt;li&gt;Not configuring VPC connector&lt;/li&gt;
&lt;li&gt;Using public IP for database&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🎯 Ideal Use Cases&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ETL pipelines&lt;/li&gt;
&lt;li&gt;Background microservices&lt;/li&gt;
&lt;li&gt;Event-driven automation&lt;/li&gt;
&lt;li&gt;Internal workflow platforms&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;🧠 Architecture Check&lt;/p&gt;

&lt;p&gt;In a Cloud Run (2nd gen) setup connecting to Cloud SQL via Private IP without a Serverless VPC Connector, what enables network access?&lt;/p&gt;

&lt;p&gt;A) Cloud NAT&lt;br&gt;&lt;br&gt;
B) Direct VPC egress configuration&lt;br&gt;&lt;br&gt;
C) Public IP exposure&lt;br&gt;&lt;br&gt;
D) Load Balancer  &lt;/p&gt;

&lt;p&gt;Answer: B) Direct VPC egress configuration&lt;/p&gt;




&lt;p&gt;💡 Interview Tip&lt;/p&gt;

&lt;p&gt;If an interviewer asks:&lt;/p&gt;

&lt;p&gt;“Why would you choose Cloud Run over GKE for workflows?”&lt;/p&gt;

&lt;p&gt;Strong answer:&lt;br&gt;
Cloud Run reduces operational overhead and is ideal for stateless, event-driven workloads. GKE is better when you need fine-grained networking control, sidecars, or complex orchestration.&lt;/p&gt;




&lt;p&gt;Full step-by-step guide with commands:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://devopspilot.com/cloud/gcp/projects/prefect-cloudrun-cloudsql/" rel="noopener noreferrer"&gt;https://devopspilot.com/cloud/gcp/projects/prefect-cloudrun-cloudsql/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>dataengineering</category>
      <category>googlecloud</category>
      <category>serverless</category>
    </item>
  </channel>
</rss>
