Deploy FastAPI on Kubernetes

Deploy FastAPI applications on Kubernetes with Wodby’s managed FastAPI stack. Start from a reusable application setup, keep environments consistent, and ship async Python APIs and web services without rebuilding the delivery platform around each project.

Start with a managed FastAPI stack

Use a ready-to-run FastAPI stack and boilerplate instead of assembling the runtime, supporting services, and deployment workflow from scratch.

Keep application services organized

Run async Python APIs and web services with clear service boundaries and environment configuration that stays consistent across deployments.

Use one workflow for delivery and operations

Keep CI/CD, routes, certificates, backups, and scaling controls in the same Wodby workflow.

Build and release

What a FastAPI deployment does on Wodby

A FastAPI deployment builds your repository, or the FastAPI boilerplate, into a Python image. The service's Dockerfile installs your requirements file, and Gunicorn then loads the application object from the location it is given.

Where the application object lives

Unless told otherwise, Gunicorn imports an object called app from a main module in the repository root. An application kept somewhere else needs its location set as a variable on the app service.

Your own Dockerfile takes over

The service's Dockerfile installs the requirements file when the repository has one. A Dockerfile committed to the repository replaces it completely and has to install the dependencies by itself.

One set of variables per link

The database, Valkey, and mail links each give the application a group of connection variables. Nothing maps them into FastAPI for you, so the code reads those names directly.

Mail in test and in production

Mailpit takes SMTP with neither authentication nor TLS, so set up the mail transport without them while testing. For real delivery, move the mail link to OpenSMTPD and attach an SMTP provider.

Read the FastAPI stack guide for setup steps, settings, and limits.

Bring an existing application

Plan your FastAPI migration with your agent

Give your coding agent access to your repository and connect Wodby through MCP. Ask it to map your app to maintained services and flag what needs to change before deploying.

Review the plan first, then approve an isolated staging deployment. Production data transfer and cutover need separate approval. MCP access does not itself grant access to your repository.

FastAPI migration planning prompt
Load Wodby’s migration guidance. Inspect this FastAPI application repository and propose a Wodby deployment plan. Identify the runtime, database, background jobs, persistent files, and required secret names without revealing values. List missing information and plan an isolated staging deployment. Do not create resources, transfer production data, change DNS, or deploy anything yet.

A modern deployment model for FastAPI

FastAPI teams benefit from repeatable builds, predictable environment configuration, and a clean way to operate application and supporting services together.

Wodby packages that model as a managed stack on Wodby Cloud, managed Kubernetes, or self-hosted Kubernetes, so teams can standardize delivery without maintaining a separate platform for every FastAPI project.

A practical fit for FastAPI workloads

  • Deploy async Python APIs and web services from a reusable stack and boilerplate.
  • Keep application, worker, database, and cache services separated where the stack needs them.
  • Use consistent configuration across development, staging, and production environments.
  • Reduce custom work around releases, routes, certificates, backups, and scaling.

What you get with Wodby

  • Managed FastAPI stack for modern container-based deployments
  • Built-in CI/CD with image builds, deployment history, and rollback attempts
  • Controlled automatic updates for stack services, app environments, and infrastructure
  • Automated backups and imports for safer releases and migrations
  • Managed routes, endpoints, and domain setup
  • App service controls for settings, resources, links, volumes, actions, and terminal access
  • Open, portable infrastructure via Wodby’s platform model

How FastAPI deployment works on Wodby

  1. 1

    Choose Wodby Cloud, managed Kubernetes, or a self-hosted Kubernetes setup on your own servers.

  2. 2

    Create a new app from the FastAPI stack and its boilerplate, then connect your repository.

  3. 3

    Configure services, domains, environment variables, persistent volumes, and databases as needed.

  4. 4

    Deploy through the built-in CI/CD workflow and scale application or worker services when demand changes.


Read more about stack management in our documentation.

Suitable for API teams, Python developers, and service-based apps

This setup is designed for teams that want to ship FastAPI applications with repeatable environments and less platform work around every project.

Wodby provides the managed FastAPI stack and delivery workflow while preserving Kubernetes-based infrastructure choices as requirements grow.

Still choosing where to run it? Compare the options on the FastAPI hosting page.

Start deploying

Want to launch FastAPI with less setup overhead?

Start with Wodby's managed FastAPI stack, connect your repo, and handle deployments, environments, and operations in one place.

Stack-specific feature

Start from the Wodby FastAPI boilerplate

The FastAPI boilerplate provides a ready project baseline for the managed stack instead of leaving teams to assemble the initial application and deployment wiring.

The primary Python service runs FastAPI through Gunicorn with Uvicorn workers for an ASGI-based serving model.

Hosting options

Run your apps where it suits you

In your own cloud account, on a server you already rent, or on Wodby Cloud. The stacks and the deployment workflow are the same on all three, and Wodby maintains the cluster.

Lowest cost

Kubernetes on your own server

Use a dedicated server or VM you already rent, from Hetzner, OVH, or any other host. Wodby installs Kubernetes on it, keeps it up to date, and deploys your apps.

  • No managed control plane to pay for
  • One command installs Kubernetes on the server
  • Join more servers as worker nodes when you need capacity
  • Operating system updates install when you choose
Explore self-hosted Kubernetes

We handle everything

Wodby Cloud

Deploy without a cloud account or a server of your own. Wodby creates and operates the cluster, and you pay for the nodes and storage you run.

  • Nothing to connect or set up before your first deploy
  • A free demo cluster to try the workflow first
  • Scales between the node counts you set
  • The same stacks and deployment workflow as your own cluster
See Wodby Cloud

Connect the services your apps already use

An integration links Wodby to an account you already have, such as your Git provider, a storage bucket for backups, or an API your app calls.

Connected once
Set up a service once and reuse it across your apps.
Out of your code
Credentials stay out of your repositories and are managed in one place.
Per environment
Override any value for each environment.
Stack preview

FastAPI stack preview

Stack serviceBase serviceRole
Python
Python (FastAPI)Primary
PostgreSQL
PostgreSQLDisabled by default
Valkey
ValkeyDisabled by default
Mailpit
MailpitDisabled by default
OpenSMTPD
OpenSMTPDDisabled by default
Gotenberg
GotenbergDisabled by default
Cloud PostgreSQL
Cloud PostgreSQLDisabled by default
OpenTelemetry Collector
OpenTelemetry CollectorDisabled by default

Keep moving

Explore the FastAPI setup, then start your own deployment

Once you've reviewed the stack structure, create an account to launch FastAPI, connect your repository, and keep delivery inside the same workflow.

Trusted by developers and businesses worldwide since 2015

Wodby is a reliable cloud infrastructure partner for your business.
See what our customers say about their experience with Wodby.

  • We moved our Drupal hosting to use Wodby and changed our development workflow to use Docker at the same time. Now we can concentrate on Drupal development and we're not losing time configuring servers etc. When a site needs additional resources or hosting in a different region we can be way more responsive as deploying a new instance takes no time at all.

    Tony Miller
    Eighty Options
    Tony Miller, Eighty Options
  • Wodby’s innovative infrastructure helped us to increase the speed and simplify our app deployment, while also leaving us the freedom of handling our hosting and not locking us on a specific pattern. We are now much more robust for future growth and will be able to innovate faster.

    Martin Normann Lund
    Ramsalt Lab
    Martin Normann Lund, Ramsalt Lab
FAQ

Frequently Asked Questions

Have questions? We've got answers. If you don't see your question here, feel free to reach out.

Get started

Ready to deploy FastAPI?

Choose Wodby Cloud, managed Kubernetes, or your own server, then deploy stacks with CI/CD, backups, SSL, integrations, and environment management in the same platform.

  • Run the same stack workflow on Wodby Cloud, managed Kubernetes, or your own server
  • Deploy app environments for production, staging, previews, and development
  • Use Wodby CI or your existing pipeline with the Wodby CLI
  • Keep backups, certificates, integrations, and access control in the platform

Start for free

No credit card required
$0/month
  • 10 app services
  • 30 minutes of integrated CI
  • 5 GB of private registry
  • Stacks & integrations
  • Technical domains with SSL
Create free account
Upgrade when you need more capacity