Skip to content

About

Deploy Supabase on Kubernetes

Resources

Code of conduct

Contributing

Stars

824 stars

Watchers

23 watching

Forks

Repository files navigation

Supabase Kubernetes


Kubernetes-native ways to run Supabase on your own cluster.

Overview | Quick Start | Helm Chart | Supabase Docs | Contributing

You can choose between two approaches:

  • Supabase Kubernetes Operator: manage Supabase through Kubernetes Custom Resources (core.supabase.io/v1alpha1). The Operator is in an early stage of development and its API may change.
  • Supabase Helm Chart: deploy Supabase using a traditional Helm chart. See charts/supabase for details.

Overview

The Operator exposes the following Kubernetes Custom Resources:

Resource Short name Description
Project projects Shared configuration, credentials, migrations, and database synchronization
SingleDatabase singledatabases Postgres database managed by the Operator
Function functions Edge Functions deployed in the cluster
Migration migrations Applies SQL scripts to referenced databases. Also used internally by the Operator to manage Supabase upgrade migrations
Auth auths Supabase Auth component
Rest rests PostgREST component
Meta metas Postgres Meta component
Realtime realtimes Supabase Realtime component
Supavisor supavisors PostgreSQL connection pooler (session and transaction modes)
Storage storages Supabase Storage component
Studio studios Supabase Studio component
Envoy envoys API gateway component
EdgeRuntime edgeruntimes Runtime for Function resources

Quick Start

Before you begin, make sure you have:

  • A Kubernetes cluster (1.28+ recommended)
  • kubectl configured to connect to your cluster
  • helm 3.x+

Add the Supabase Helm repository:

helm repo add supabase https://supabase-community.github.io/supabase-kubernetes
helm repo update

Deploy the Operator

Deploy the Operator into the supabase-operator namespace:

helm install supabase-operator supabase/supabase-operator \
  --namespace supabase-operator \
  --create-namespace

This installs the CRDs and deploys the controller in a single step.

Deploy a Supabase Project

The supabase-project chart creates a SingleDatabase, a Project, and the enabled component resources. Install it setting the required values:

helm install supabase supabase/supabase-project \
  --set fullnameOverride=supabase \
  --set project.publicUrl=http://localhost:8000

The Operator will provision the Postgres StatefulSet, the component Deployments, Services, Secrets, and run sync Jobs to configure JWT keys and the database.

Retrieve the generated database password, the Studio credentials, and the API keys with a single command:

kubectl get secrets supabase-postgres-auth supabase-envoy-auth supabase-jwt \
  -o go-template='{{range .items}}{{if eq .metadata.name "supabase-postgres-auth"}}{{printf "%-18s: %s" "Database Password" (.data.password | base64decode)}}{{"\n"}}{{end}}{{if eq .metadata.name "supabase-envoy-auth"}}{{printf "%-18s: %s" "Studio Username" (.data.username | base64decode)}}{{"\n"}}{{printf "%-18s: %s" "Studio Password" (.data.password | base64decode)}}{{"\n"}}{{end}}{{if eq .metadata.name "supabase-jwt"}}{{printf "%-18s: %s" "Publishable Key" (index .data "publishable-key" | base64decode)}}{{"\n"}}{{printf "%-18s: %s" "Secret Key" (index .data "secret-key" | base64decode)}}{{"\n"}}{{end}}{{end}}'

Access Supabase

Once the resources are ready, forward the Envoy gateway to your local machine:

kubectl port-forward svc/supabase-envoy 8000:8000

The Studio and the Supabase APIs are available at http://localhost:8000.

Access through Ingress

Set ingress.enable: true and ingress.host to expose Studio and APIs on the same host. The Ingress forwards / to Envoy, preserving Studio authentication. Set project.publicUrl to the corresponding public URL. Optional className, annotations and tls fields configure the controller and TLS termination. The cluster must provide the Ingress Controller and TLS Secrets. Envoy must be enabled, and Service overrides must preserve its named port envoy.

Contributing

Contributions are welcome. Before starting significant work, please open an issue to discuss your idea or bug report. When you are ready, fork the repository, make your changes, and open a pull request.

For setup instructions, build commands, and testing workflows, see DEVELOPERS.md.

Support

This project is supported by the community and not officially supported by Supabase. Please do not create issues on the official Supabase repositories if you face problems using this project. Instead, open an issue on this repository.

About

Deploy Supabase on Kubernetes

Resources

Code of conduct

Contributing

Stars

824 stars

Watchers

23 watching

Forks

Releases

Packages

Contributors

Languages