deployments/kubernetes/ in the main repository. This guide walks through a production-grade deployment: creating secrets, applying all manifests in order, verifying the rollout, and configuring ingress.
Prerequisites
Before you start, make sure you have:- A Kubernetes 1.24 or later cluster
kubectlconfigured to target the cluster- A Supabase project — see Prerequisites
- A PostgreSQL instance (managed service like RDS, CloudSQL, or Azure Database — or use the in-cluster Postgres manifest)
- Redis (optional — the API degrades gracefully if unavailable)
Manifest directory structure
Create the Secret
Copy the example secret file and fill in your values:Edit Apply the secret:
secret.yaml:Apply the ConfigMap
Edit
configmap.yaml to set your FRONTEND_URL, SERVER_PORT, and ENVIRONMENT, then apply:Deploy Postgres and Redis
If you’re connecting to an external database, skip the Postgres manifest. Otherwise, deploy both:Wait for both pods to become ready before proceeding:
Deploy the API
Apply the API deployment and service:Check the rollout:Verify the health endpoint from inside the cluster:
Default resource limits
The manifests include conservative resource limits. Adjust them based on the number of resources you’re scanning and how frequently you run scans:| Container | CPU request | CPU limit | Memory request | Memory limit |
|---|---|---|---|---|
api | 100m | 500m | 256Mi | 1Gi |
frontend | 50m | 200m | 64Mi | 256Mi |
postgres | 200m | 1000m | 512Mi | 2Gi |
redis | 50m | 100m | 64Mi | 256Mi |
Horizontal scaling
The API is stateless — sessions are in Supabase and shared cache state is in Redis. You can scale the API horizontally at any time:Next steps
Configuration reference
Review all environment variables and tune your deployment.
Upgrades
Learn how to update image tags and run migrations safely.