Creating a PostgreSQL Cluster using Helm
Editor’s note: Today’s guest post is by Jeff McCormick, a developer at Crunchy Data, showing how to deploy a PostgreSQL cluster using Helm, a Kubernetes package manager.
In this post we’ll show you how to deploy a PostgreSQL cluster using . This example will create the following in your Kubernetes cluster: This example creates a simple Postgres streaming replication deployment with a master (read-write), and a single asynchronous replica (read-only). You can scale up the number of replicas dynamically. Contents The example is made up of various Chart files as follows:
values.yaml | This file contains values which you can reference within the database templates allowing you to specify in one place values like database passwords |
templates/master-pod.yaml | The postgres master database pod definition. This file causes a single postgres master pod to be created. |
templates/master-service.yaml | The postgres master database has a service created to act as a proxy. This file causes a single service to be created to proxy calls to the master database. |
templates/replica-rc.yaml | The postgres replica database is defined by this file. This file causes a replication controller to be created which allows the postgres replica containers to be scaled up on-demand. |
templates/replica-service.yaml | This file causes the service proxy for the replica database container(s) to be created. |
Installation