Then, we can install the Supabase Helm chart: Kubectl -n default create secret generic demo-supabase-db \ from-literal =password = 'example123456' # creates DB secret Kubectl -n default create secret generic demo-supabase-smtp \ from-literal =secret = 'abcdefghijklmnopqrstuvwxyz123456' # creates SMTP secret from-literal =serviceKey = '4tG7eqJPh1Y58DbtIlJBauwpqx39UF-MwM8k' \ from-literal =anonKey = '6QU2WgJICeqwyzyZO88' \ Kubectl -n default create secret generic demo-supabase-jwt \ You can find the full contents of our example here.īefore we can install the Supabase Helm chart, we also need to set up some secrets with the Supabase auth keys, and also our StackGres cluster credentials.įor this, we first find out the superuser password of our created StackGres cluster: You need to change this depending on your Kubernetes cluster and cloud setup, for example using Kubernetes ingresses with your correct host name, or exposing the demo-supabase-kong and demo-supabase-studio service in any other way. We edit the contents of our, to disable the database creation (since we use our own), to change the db host names, and URLs of the Supabase API and Studio.įor a first test, it’s sufficient to use a local port forwarding, so our example uses localhost addresses instead of Kubernetes ingress resources. You can find exhaustive versions of installation guides in the official docs.įor our setup, we execute the following Helm commands: One of the easiest ways to install StackGres is to use the official Helm chart. You can find the example resources in the apps-on-stackgres GitHub repository. We will install StackGres into your cluster, create a StackGres PostgreSQL cluster, install Supabase with our database configured, and create an example Hello World web app to test the whole setup. In this post, we assume that you already have a Kubernetes cluster available, configured for your kubectl, and that you have a Unix-style shell with helm, git, npm, and npx (for the getting-started web app) installed. This blog post will show you how to self-host Supabase in your Kubernetes cluster, using StackGres as PostgreSQL operator. Think of StackGres as the Kubernetes version of your friendly DBA – just with a Kubernetes API, much faster response time, and fewer coffee breaks □ StackGres provides all features and management options required for running PostgreSQL in production, and on top of that it ships with sensible default options. One of the best ways to manage and deploy PostgreSQL instances in a Kubernetes environment is to use the StackGres operator. So, you do want to manage your PostgreSQL instances well, especially in containerized environments such as Kubernetes. Supabase is all about providing a flexible, scalable, and reliable backend platform for your product.īesides using the hosted platform, you probably know that you can also self-host Supabase.ĭoing so provides the maximum flexibility.īut as always, with great power comes great responsibility, and you do want to make sure that the underlying databases are reliable and managed in a production-grade way, to keep your users' data available and safe. Running Supabase on Top of StackGres Supabase With StackGres
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |