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