Fly.io to Kubernetes: Migrating to Your Own Cloud Account
How to move a Fly.io app to Kubernetes in your own AWS, GCP, Azure or Scaleway account: map fly.toml, move Postgres, cut over DNS, and price it honestly.
Migrating a Fly.io app to Kubernetes in your own cloud account is a mapping job, then a database move, then a DNS cutover. Every fly.toml concept has a Kubernetes equivalent: process groups become Deployments, [http_service] becomes a Service plus Ingress, [[mounts]] become PersistentVolumeClaims, release_command becomes a Job that runs before the rollout, and .internal DNS becomes cluster DNS.
Predictable pricing comes from the billing model, so decide it before you move. Fly.io bills started Machines by the second ($2.19 a month for a 256 MB shared-cpu-1x, $6.70 for 1 GB) plus per-GB egress by region group, according to Fly.io's pricing docs. In your own account you pay for nodes you size, can apply commitments and credits, and see every line on one cloud bill.
Fewer single points of failure needs more than a new host. Fly.io's own docs say a volume is "tied to that hardware" and tell you to provision at least two per app (Fly Volumes overview). On Kubernetes, fix it with at least two replicas spread across availability zones and a managed, multi-AZ database, because a cloud block volume is still zonal.
Zero-downtime is realistic with logical replication or a short write freeze.pg_dump plus a maintenance window works for small databases. For larger ones, replicate into the new database, lower DNS TTLs a day before, flip, and keep Fly.io running for rollback.
Qovery, the Agentic DevOps platform, runs the Kubernetes side in your own AWS, GCP, Azure or Scaleway account. An agent reads your repository and proposes a deployment plan you approve; Qovery then builds, deploys, and operates the apps, jobs and managed databases, and the compute stays on your cloud bill.
I spend a good part of my week helping teams plan exactly this kind of move. The Fly.io conversations have a pattern: the app works, the developer experience is good, and then something pushes the team toward its own cloud account. A customer asks where the data lives. A finance lead asks why the bill moved so much in a month with no new feature. Or a host failure takes down the one Machine that had the volume.
This guide is the plan I walk teams through: why they leave, how fly.toml translates to Kubernetes, where to run the target, how to move the database without downtime, and how to compare cost with real numbers instead of a guess. I will also say where Fly.io is still the better choice, because for some apps it is.
Why do teams migrate from Fly.io to their own cloud account?
Teams leave Fly.io for four reasons: a bill that moves with usage, volumes that live on a single host, region and egress economics, and support or compliance requirements that point to their own cloud account. None of these mean Fly.io is a bad product. They mean the app grew into a different set of constraints.
Pricing predictability
Fly.io is usage-based. Started Machines are "billed by the second while they're running", stopped Machines pay only for root filesystem storage at $0.15/GB/month, and volumes cost $0.15/GB/month of provisioned capacity (Fly.io pricing docs). That model is great for spiky or small apps. It is harder to forecast when auto_stop_machines and auto_start_machines change the number of running Machines with traffic, and when egress is billed per region group.
Per Fly.io's published rates, public egress costs $0.02/GB in North America and Europe, $0.04/GB in Asia Pacific, Oceania and South America, and $0.12/GB in Africa and India (Fly.io pricing docs). A dedicated IPv4 address is $2/month. Fly.io does offer discounts: 30% on regional reservation blocks and 10-20% on global reservations. So "predictable" on Fly.io is possible, but you have to buy it through reservations.
In your own cloud account, predictability comes from different levers: you pick node sizes, you buy Savings Plans or committed use discounts, and you can spend startup credits. Every cost sits on one bill you already reconcile.
Volumes tied to one host
This is the reason I hear most from teams running stateful services. Fly.io is clear about it: "A Fly Volume is a slice of an NVMe drive on the same physical server as the Machine on which it's mounted and it's tied to that hardware." If that drive fails, "that instance of your app goes down", and Fly.io "does not automatically replicate data among the volumes on an app" (Fly Volumes overview). A volume attaches to only one Machine, and snapshots are daily, kept five days by default (configurable from 1 to 60).
Fly.io's own recommendation is to "always provision at least two volumes per app". That is good advice. It also means the redundancy is your app's job.
The same applies to the legacy Fly Postgres. Fly.io now says "Fly Postgres (unmanaged) is no longer maintained, and Fly.io Support is not able to provide support or guidance for it" (Fly.io docs). If you are still on it, you have to move the database anyway, either to Fly Managed Postgres or to a managed database in your own cloud.
Regions and incidents
Fly.io runs on its own hardware in 18 regions. Fly Managed Postgres is available in 13 of them (Fly Managed Postgres), so check that your region has it before you plan anything else.
Every provider has incidents, and that includes every cloud I have worked on. On 12 November 2026, an upstream datacenter power outage hit Fly.io's LAX region for about three hours and temporarily affected apps and Managed Postgres clusters there (Fly.io status). The Fly.io team restored it and posted updates through the whole incident. It can happen to anyone, and I wish their team calm on-call weeks. The lesson for your own design is the same everywhere: if one region or one host can take your app down, the architecture has a single point of failure, wherever it runs.
Support and compliance
Fly.io sells support plans: Standard at $29/month, Premium at $199/month, and Enterprise from $2,500/month (Fly.io pricing docs). Fly.io holds SOC 2 Type II and offers HIPAA with a pre-signed BAA, as our Qovery vs Fly.io comparison notes. The question I hear from enterprise buyers is different: they want the workloads in a cloud account the customer controls, with their own IAM, VPC, and audit trail. We found no option on Fly.io's site to run workloads in your own cloud account, so that requirement usually ends the discussion.
When should you stay on Fly.io?
Stay on Fly.io if your app is small, you do not want a cloud account to manage, or you need hardware-isolated sandboxes for agents. The smallest Machine is $2.19 a month and Managed Postgres starts at $4 a month. For one app with modest traffic, a Kubernetes cluster costs more in control plane fees alone: Amazon EKS charges $0.10 per cluster per hour (AWS EKS pricing), about $73 a month, before a single node.
Fly.io's Sprites, full Linux computers built for agents, are also something Qovery does not offer, since Qovery is not an execution sandbox. If that is the core of your product, stay.
How does fly.toml map to Kubernetes objects?
Each fly.toml section has a direct Kubernetes counterpart, so the migration starts as a translation exercise. Read your fly.toml top to bottom and fill in the right-hand column. The definitions below come from Fly.io's fly.toml reference and private networking docs.
Fly.io concept
What it does on Fly.io
Kubernetes equivalent
Watch out for
app and [processes]
One app, with process groups (web, worker) running on separate Machines
One Deployment per process group, same image, different command
Size each Deployment separately; workers rarely need the web's memory
Search your code and env vars for .internal and .flycast
Fly Postgres or Managed Postgres
Legacy unmanaged app, or MPG with primary, replica and failover
A managed cloud database (Amazon RDS, Cloud SQL, Azure Database for PostgreSQL, Scaleway Managed Database)
Do not run production Postgres in a pod unless you run an operator you know well
[[statics]]
Serve assets from the image or Tigris
Serve from the app, or object storage plus a CDN
Small, but easy to forget
Two items catch most teams. First, hard-coded .internal hostnames in env vars and config files. Grep the repo before you start. Second, release_command semantics: on Fly.io it runs before Machines update, so make sure the Kubernetes Job finishes before the Deployment rolls, and that a failed migration stops the deploy.
Move your Fly.io app into your own cloud account.
Qovery, the Agentic DevOps platform, deploys your apps on Kubernetes in your own AWS, GCP, Azure or Scaleway account, or on a cluster you already run. Start on the Free plan, no credit card.
You have three realistic targets: a managed Kubernetes service you operate yourself, a platform that operates Kubernetes in your own account, or another PaaS. Only the first two put the workloads in your own cloud account. I compared related options for Heroku-style apps in this Rails cost breakdown and a wider list of migration tools in this managed platform to hyperscaler guide.
Target
Runs in your cloud account
Who operates Kubernetes
Pricing model
Best for
Amazon EKS, Google GKE, Azure AKS or Scaleway Kapsule, DIY
Yes
Your team (upgrades, ingress, cert-manager, autoscaling, CI/CD, observability)
Cloud bill only; EKS charges $0.10 per cluster per hour
Teams with a platform engineer and strong opinions about tooling
Qovery on your own cluster or account
Yes
Qovery operates deployments and, on managed clusters, the cluster itself
Qovery plan per month, compute on your cloud bill
Teams that want their own account without hiring for Kubernetes
Other PaaS (Render, Railway, Heroku)
No, the vendor's infrastructure
The vendor
Per service or usage based
Teams who mostly want a different PaaS, not their own account
Stay on Fly.io with Managed Postgres and reservations
No, Fly.io hardware
Fly.io
Per second plus reservations
Small apps and teams without a cloud account
DIY gives you a cluster that is free to design and expensive to maintain. Kubernetes minor versions need upgrades several times a year, and EKS moves clusters on versions past standard support to $0.60 per cluster per hour (AWS EKS pricing). If nobody on the team owns that work, it will not get done.
How do you migrate from Fly.io to Kubernetes without downtime?
Run both stacks in parallel, replicate the database, cut over DNS with a low TTL, and keep Fly.io running until you are sure. Here is the order I use.
Step 1: Inventory the Fly.io app
List everything the app touches:
Every process group, its Machine size and count per region (fly scale show, fly status).
Every volume, its size and what writes to it.
Every secret name (fly secrets list shows names, not values; get the values from your password manager or source of truth).
Every .internal or .flycast hostname in code and config.
Custom domains, certificates, and dedicated IPs.
External services: Upstash Redis, Tigris buckets, third-party APIs with IP allowlists.
Step 2: Containerize and stand up the target
If you deploy on Fly.io with a Dockerfile, reuse it. If you use buildpacks through [build] builder, either keep building with Cloud Native Buildpacks or write a Dockerfile; I prefer a Dockerfile for portability.
Create the cluster in the region closest to your Fly.io primary_region, with nodes in at least two availability zones. Deploy every process group as its own Deployment, at two replicas minimum for anything that serves traffic, with topology spread constraints across zones and a PodDisruptionBudget. This is the step that removes the single-host failure mode.
Step 3: Replace volumes
For each [[mounts]], ask what the volume is for:
Uploads or files: move them to object storage (S3, GCS, Azure Blob, Scaleway Object Storage). This is the best outcome, because the app becomes stateless.
SQLite or LiteFS: move to managed Postgres or MySQL if you can. If you cannot, a StatefulSet with a PVC works, but you inherit the same single-volume problem, now within one zone.
Caches: drop the volume and use Redis or an in-memory cache.
A PersistentVolumeClaim backed by a cloud block volume (EBS, Persistent Disk, Azure Disk) lives in one zone. That is better than one host, since the cloud replicates the block device within the zone, but a zone outage still takes it down. Managed databases with multi-AZ standby, such as Amazon RDS Multi-AZ, are the cleanest fix for state.
Step 4: Move the database
Pick the method by size and by how much write downtime you can accept.
Small databases (a few GB), short freeze accepted. Fly.io documents the standard dump and restore path for Managed Postgres, including pg_dump --no-owner --no-acl and fly mpg proxy for tools that need a direct connection (Fly.io import guide). Reverse the direction for the export:
BASH|Terminal 1: open a local tunnel to the Fly Managed Postgres cluster
fly mpg proxy <CLUSTER_ID>
# Terminal 2: dump through the tunnel, restore into the new database
pg_dump --no-owner --no-acl -Fc -f app.dump "$FLY_PG_URL_VIA_PROXY"
pg_restore --no-owner --no-acl -d "$NEW_PG_URL" app.dump
Put the app in maintenance mode or read-only, dump, restore, verify row counts, then switch. The freeze lasts as long as the dump plus the restore.
Larger databases, near-zero downtime. Use PostgreSQL logical replication: create a publication on the Fly.io side, a subscription on the new database, let it catch up, then switch writes. This needs wal_level = logical and a role with replication rights on the source. On the legacy unmanaged Fly Postgres you control the server settings. On Fly Managed Postgres, I could not find documentation of logical replication support, so confirm with Fly.io support before you plan around it. If it is not available, tools such as pgcopydb, which Fly.io itself suggests for larger imports, shorten the freeze.
Before the cutover, compare row counts per table and reset sequences on the target (SELECT setval(...)), because logical replication does not copy sequence values.
Step 5: Run in parallel and test
Point a staging hostname at the Kubernetes Ingress. Run your smoke tests, a load test at your real peak, and one failure test: delete a pod, drain a node, and watch the app stay up. If it does not survive a node drain, you have rebuilt the single point of failure.
Step 6: Cut over DNS
A day before, lower the TTL on your records to 60 seconds. On cutover day:
Freeze writes on Fly.io (maintenance mode or read-only).
Let logical replication catch up, or run the final dump and restore.
Point the app on Kubernetes at the new database as primary.
Switch DNS to the new Ingress or load balancer.
Watch error rates, latency, and the database connections for an hour.
Step 7: Keep a rollback path
Leave the Fly.io app deployed, scaled down to one Machine, for a week or two. Write down the rollback trigger before cutover (for example, error rate above 1% for 10 minutes, or a data mismatch) and who makes the call. If you need to roll back after writes have landed in the new database, you need reverse replication or a reconciliation script, so decide upfront how long that window can be.
Once the window closes, destroy the Fly.io Machines, volumes and IPs, and check the next invoice to confirm nothing is still billing.
How do you compare Fly.io and Kubernetes costs honestly?
Price the same workload on both sides, line by line, from each provider's published prices, and include the people cost of running Kubernetes. I will not give you a made-up total, because your workload decides it. Here is the method, with Fly.io's published unit prices filled in as an example of the arithmetic. I built a longer version of this method in this cost analysis guide.
Count x monthly price per size x share of the month running
2 x shared-cpu-1x 1 GB at $6.70 = $13.40 if always on
Worker Machines
Same
1 x shared-cpu-1x 512 MB at $3.69
Stopped Machines
rootfs GB x $0.15
Depends on image size
Volumes
Provisioned GB x $0.15
2 x 10 GB = $3.00
Managed Postgres
Plan + storage above included, $0.28/GB
Basic plan $38/month
Egress
GB per region group x rate
100 GB in North America or Europe at $0.02 = $2.00
Dedicated IPv4
$2 per address
$2.00
Support plan
If you need one
$29, $199 or from $2,500
Reservations
Subtract the discount you actually bought
10-30% on reserved compute
Your cloud account side (use the provider's calculator, such as the AWS Pricing Calculator):
Line item
How to compute
Control plane
EKS $0.10 per cluster per hour, roughly $73 a month; check GKE, AKS and Kapsule pricing for your tier
Nodes
Sum of pod requests, plus headroom, rounded up to instance sizes, times hours
Load balancer
One per Ingress controller or LoadBalancer Service, plus its usage charge
Block and object storage
Provisioned GB times the rate for your volume type
Managed database
Instance size times hours, doubled for multi-AZ standby, plus storage and backups
Egress and NAT
Data out to the internet (AWS includes 100 GB free each month across services, AWS EC2 pricing) plus NAT gateway processing
Discounts
Savings Plans, committed use, startup credits
Operations
Hours per month someone spends on upgrades, on-call, and tooling, times their cost, or a platform fee
Two notes from experience. Small apps usually cost more on their own cloud account, because the control plane, load balancer and NAT are fixed costs. The math tips when you run several apps or environments on the same cluster, when you have credits or commitments, or when a customer contract requires your own account. And the first cloud bill after a migration often has a surprise line, usually NAT or cross-zone traffic, so watch it in week one.
How does Qovery handle a Fly.io migration?
Qovery, the Agentic DevOps platform, runs the Kubernetes side of this plan in your own AWS, GCP, Azure or Scaleway account, and an agent does the first pass of the migration with you. You install the Qovery Agent Skills, point your coding agent at the repository, and ask it to deploy the app with Qovery. The agent reads the repo, including your Dockerfile and your fly.toml as ordinary files, and proposes a plan: which services, which jobs, which database, which variables. You approve it before anything is created. Qovery does not import fly.toml automatically, and there is no Fly.io-specific migration tool; the agent works from what is in the repository. The migration hub and the PaaS to your own cloud page describe the flow.
What Qovery then runs in your account:
Each process group as an application, with git-push deployments and a preview environment per pull request.
release_command as a Lifecycle Job that runs on deploy.
Postgres as a managed cloud database, such as Amazon RDS, through Blueprints, or as a container database for non-production.
Autoscaling, RBAC, audit logs, and Qovery Observe for metrics and logs.
What stays yours: the cloud account, the VPC, the data, and the cloud bill. Qovery never hosts your apps.
To start, use the Free plan (3 users, one cluster of your own, no credit card), try it locally with qovery demo up, or connect an EKS, GKE or Kapsule cluster you already run with the Qovery Operator (BYOK docs). Qovery is not the right fit if you want no cloud account at all, or if you need agent sandboxes like Fly.io's Sprites.
How do I run this migration with Qovery from Claude Code or Cursor?
Install the Qovery Agent Skills once, then ask your agent in plain language. The skills deploy (qovery-onboard, qovery-deploy, qovery-troubleshoot, qovery-optimize, qovery-speedup, qovery-preview, qovery-terraform); the MCP Server operates what already exists.
Install the skills for Claude Code, Cursor, Codex, OpenCode and Gemini CLI:
Add the Qovery MCP Server to Claude Code. It signs in with OAuth and is read-only by default:
BASH
claude mcp add --transport http qovery https://mcp.qovery.com/mcp --callback-port 4242
Only if you want the agent to change things, add write access. This also needs write access enabled in the Qovery Console:
BASH
claude mcp add --transport http qovery "https://mcp.qovery.com/mcp?read_write=true" --callback-port 4242
Then ask: "Read fly.toml and deploy this app with Qovery to my AWS account, with a managed PostgreSQL and a migration job that runs before each deploy." The agent proposes the plan and asks you to approve it before it creates anything. Move the data and switch DNS yourself, following the steps above. Start from the AI agent quickstart or the Claude Code integration.
Frequently asked questions
How do you migrate a Fly.io application to Kubernetes in your own cloud account?
Map each fly.toml section to a Kubernetes object (process groups to Deployments, [http_service] to a Service and Ingress, mounts to PersistentVolumeClaims or object storage, release_command to a Job), deploy it in your own AWS, GCP, Azure or Scaleway account, move Postgres with pg_dump or logical replication, then switch DNS with a low TTL. Keep the Fly.io app running for a week or two as a rollback path.
Is Kubernetes in my own cloud account more predictable than Fly.io pricing?
It can be. Fly.io bills started Machines by the second and egress per GB by region group, so the bill follows traffic unless you buy reservations. In your own account you size nodes, buy commitments, and see every cost on one bill. For a single small app, Fly.io is usually cheaper, because Kubernetes adds fixed costs like the control plane and load balancer.
How do I avoid single points of failure after leaving Fly.io?
Run at least two replicas of every serving process, spread across availability zones with topology spread constraints, add a PodDisruptionBudget, and put Postgres on a managed database with a multi-AZ standby. A Kubernetes PersistentVolume backed by a cloud disk is still zonal, so move files to object storage where you can.
Can Qovery read my fly.toml and migrate the app automatically?
No. Qovery does not import fly.toml automatically. With the Qovery Agent Skills installed, your coding agent reads the repository, including fly.toml, and proposes a deployment plan that you approve, then Qovery deploys the apps, jobs and database into your own cloud account. You still move the data and switch DNS.
What happens to Fly Postgres during the migration?
If you run the legacy unmanaged Fly Postgres, Fly.io no longer maintains it, so you need to move it either way. Use pg_dump and pg_restore for small databases with a short write freeze, or logical replication for near-zero downtime. If you are on Fly Managed Postgres, fly mpg proxy gives you a local tunnel for the dump; confirm logical replication support with Fly.io before relying on it.
Does Qovery work with an existing EKS or GKE cluster?
Yes. Qovery, the Agentic DevOps platform, connects a cluster you already run through the Qovery Operator, installed once with Helm, and supports EKS, GKE and Scaleway Kapsule with Kubernetes 1.31 or later. Other clusters such as AKS connect with qovery cluster install. The Free plan covers one such cluster.
Guillaume is a Staff Solutions Architect at Qovery. He helps customers troubleshoot production infrastructure and writes about Kubernetes operations, AI agents, and reliable cloud platforms.
Next step
Move your Fly.io app into your own cloud account.
Qovery, the Agentic DevOps platform, deploys your apps on Kubernetes in your own AWS, GCP, Azure or Scaleway account, or on a cluster you already run. Start on the Free plan, no credit card.