Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ Pass additional overrides (for example `.Values.extraArgs` or `.Values.resources

## Quick Start

For a fresh cluster, follow the [verified CloudNativePG and MinIO quickstart](docs/quickstart.md).

### 1. Create Database Secret

```bash
Expand Down
205 changes: 205 additions & 0 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
# Quickstart

This guide installs Supabase Operator and its PostgreSQL and object storage
dependencies on a fresh Kubernetes cluster.

The dependency manifests use local credentials for evaluation. Change every
password before exposing any service outside the cluster.

## Prerequisites

1. Kubernetes 1.33 or later
2. `kubectl`
3. Helm
4. A local copy of this repository

Add the chart repositories:

```sh
helm repo add cnpg https://cloudnative-pg.github.io/charts
helm repo add minio https://charts.min.io/
helm repo add jetstack https://charts.jetstack.io
helm repo add strrl https://helm.strrl.dev
helm repo update cnpg minio jetstack strrl
```

## 1. Install CloudNativePG

```sh
helm upgrade --install cnpg cnpg/cloudnative-pg \
--namespace cnpg-system \
--create-namespace \
--version 0.29.0 \
--wait \
--timeout 5m

kubectl apply -f docs/quickstart/postgres-cluster.yaml
kubectl wait \
--namespace supabase-quickstart \
--for=condition=Ready \
cluster/supabase-postgres \
--timeout 10m
```

Expected result:

```text
cluster.postgresql.cnpg.io/supabase-postgres condition met
```

The checked in Cluster manifest uses `supabase/postgres`, UID `101`, GID
`102`, and superuser access. These settings are required by the database
initialization job.

## 2. Install MinIO

```sh
helm upgrade --install minio minio/minio \
--namespace supabase-quickstart \
--create-namespace \
--version 5.4.0 \
--values docs/quickstart/minio/values.yaml \
--wait \
--timeout 5m

kubectl rollout status deployment/minio \
--namespace supabase-quickstart \
--timeout 5m
```

Expected result:

```text
deployment "minio" successfully rolled out
```

The chart values create the `supabase-storage` bucket. Its name and
credentials match `docs/quickstart/storage-secret.yaml`.

## 3. Install cert-manager and Supabase Operator

The operator webhook uses cert-manager.

```sh
helm upgrade --install cert-manager jetstack/cert-manager \
--namespace cert-manager \
--create-namespace \
--version v1.21.0 \
--set crds.enabled=true \
--wait \
--timeout 5m

helm upgrade --install supabase-operator strrl/supabase-operator \
--namespace supabase-operator-system \
--create-namespace \
--version 2026.7.25 \
--wait \
--timeout 5m

kubectl rollout status deployment/supabase-operator \
--namespace supabase-operator-system \
--timeout 5m
```

Expected result:

```text
deployment "supabase-operator" successfully rolled out
```

## 4. Create the credential Secrets

```sh
kubectl apply -f docs/quickstart/database-secret.yaml
kubectl apply -f docs/quickstart/storage-secret.yaml
kubectl apply -f docs/quickstart/studio-basic-auth-secret.yaml
```

Expected Secrets:

```text
supabase-db-credentials
supabase-storage-credentials
supabase-studio-basic-auth
```

Secret key names are part of the operator API contract. Do not rename
`host`, `port`, `database`, `username`, `password`, `endpoint`, `region`,
`bucket`, `accessKeyId`, or `secretAccessKey`.

## 5. Create the SupabaseProject

```sh
kubectl apply -f docs/quickstart/supabase-project.yaml
kubectl wait \
--namespace supabase-quickstart \
--for=jsonpath='{.status.phase}'=Running \
supabaseproject/quickstart \
--timeout 10m
Comment on lines +134 to +138

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Wait for component deployments before opening Studio

On a fresh cluster, this wait can finish before any component pod is ready: internal/controller/supabaseproject_controller.go:158-168 sets the phase to Running immediately after reconciliation, while internal/controller/reconciler/component.go:35-50 only creates or updates each Deployment without checking available replicas. The following Studio port-forward can therefore fail with no running pod while images are still pulling; wait for the component Deployments to roll out before proceeding.

Useful? React with 👍 / 👎.


kubectl get supabaseproject quickstart \
--namespace supabase-quickstart
Comment on lines +140 to +141

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Request the PHASE column in the get command

The packaged SupabaseProject CRD defines no additional printer columns, so this plain kubectl get command displays the default NAME and AGE columns rather than the documented NAME and PHASE result. The validation record uses an explicit -o custom-columns='NAME:.metadata.name,PHASE:.status.phase'; use that here as well so users can actually perform the stated status check.

Useful? React with 👍 / 👎.

```

Expected result:

```text
NAME PHASE
quickstart Running
```

The project uses `sslMode: require` for PostgreSQL and path style S3
requests for MinIO.

## 6. Open Studio

Forward Kong in one terminal:

```sh
kubectl port-forward \
--namespace supabase-quickstart \
service/quickstart-kong \
18000:8000
```

Open <http://127.0.0.1:18000/> and enter:

```text
Username: supabase
Password: quickstart-studio-password
```

The browser should load Supabase Studio. You can also check the response:

```sh
curl \
--user supabase:quickstart-studio-password \
--location \
--output /dev/null \
--silent \
--show-error \
--write-out 'HTTP %{http_code}\n' \
http://127.0.0.1:18000/
```

Expected result:

```text
HTTP 200
```

## Troubleshooting

Check project status and operator logs:

```sh
kubectl get supabaseproject quickstart \
--namespace supabase-quickstart \
-o yaml

kubectl logs deployment/supabase-operator \
--namespace supabase-operator-system
```

The complete validation record is in
[`docs/quickstart/VALIDATION.md`](quickstart/VALIDATION.md).
Loading