Skip to content
Home / Migrations / Kubernetes (self-managed)Fly.io

Kubernetes (self-managed) Fly.io

medium

Fly.io manages the underlying infra. Machines API replaces Deployments/Pods. Much simpler ops, global edge deployment, significantly cheaper for small-medium workloads.

Estimated: 4-12h · 6 steps
Progress0%
Step 1: Install flyctl
curl -L https://fly.io/install.sh | sh && fly auth login
Step 2: Launch app

Fly detects your Dockerfile automatically. It creates fly.toml config.

fly launch
Step 3: Configure services

Edit fly.toml: [[services]] replaces Kubernetes Service. [[services.ports]] for port mapping. [[mounts]] for persistent volumes.

Step 4: Migrate stateful services

Postgres: use Fly Postgres or bring your own (managed). Redis: Upstash Redis works well with Fly.

Step 5: Set secrets

kubectl secrets → fly secrets. Env vars injected at runtime.

fly secrets set DATABASE_URL=postgres://...
Step 6: Deploy and scale
fly deploy && fly scale count 2 --region iad,fra
App running in target regions, health checks passing, autoscaling configured

What this migration involves

Moving from Kubernetes (self-managed) to Fly.io is rated medium and takes about 4-12h on a typical project. The guide breaks it into 6 steps, 4 of which ship with runnable commands and 1 with a verification check.

FAQ

How long does migrating from Kubernetes (self-managed) to Fly.io take?

Around 4-12h for a typical project — 6 steps, difficulty rated medium, 4 of them with copy-paste commands.

Is moving from Kubernetes (self-managed) to Fly.io reversible?

No reverse guide is tracked yet, so treat this as a one-way move and keep a full export of your Kubernetes (self-managed) data before you start.

What does Fly.io cost compared to Kubernetes (self-managed)?

Fly.io: freemium from $0/mo, free plan available.