Project: CloudNativePG (App Definition and Development / Database)
File: samples.md

The examples show configuration files for setting up your PostgreSQL cluster. !!! Important These examples are for demonstration and experimentation purposes. You can execute them on a personal Kubernetes cluster with Minikube or Kind, as described in . !!! Seealso "Reference" For a list of available options, see . Basic cluster : A basic example of a cluster. Custom cluster : A basic cluster that uses the default storage class and custom parameters for the `postgresql.conf` and `pg_hba.conf` files. Cluster with customized storage class : : A basic cluster that uses a specified storage class of `standard`. Cluster with persistent volume claim (PVC) template configured : : A basic cluster with an explicit persistent volume claim template. Extended configuration example : : A cluster that sets most of the available options. Bootstrap cluster with SQL files : : A cluster example that executes a set of queries defined in a secret and a `ConfigMap` right after the database is created. Sample cluster with customized `pg_hba` configuration : : A basic cluster that enables the user app to authenticate using certificates. Sample cluster with Secret and ConfigMap mounted using projected volume template : A basic cluster with the existing `Secret` and `ConfigMap` mounted into Postgres pod using projected volume mount. Customized storage class and backups : Prerequisites: Bucket storage must be available. The sample config is for AWS. Change it to suit your setup. : A cluster with backups configured. Backup : Prerequisites: applied and healthy. : : An example of a backup that runs against the previous sample. Simple cluster with backup configured : Prerequisites: The configuration assumes minio is running and working. Update `backup.barmanObjectStore` with your minio parameters or your cloud solution. : A basic cluster with backups configured. Replica cluster by way of backup from an object store : Prerequisites: applied and healthy, and a backup applied and completed. : : A replica cluster following a cluster with backup configured. Replica cluster by way of volume snapshot : Prerequisites: applied and healthy, and a volume snapshot applied and completed. : : A replica cluster following a cluster with volume snapshot configured. Replica cluster by way of streaming (pg_basebackup) : Prerequisites: applied and healthy. : : A replica cluster following `cluster-example` with streaming replication. PostGIS example : : An example of a PostGIS cluster. See for details. Cluster with declarative role management : : Declares a role with the `managed` stanza. Includes password management with Kubernetes secrets. Cluster with declarative tablespaces : Cluster with declarative tablespaces and backup : Prerequisites: The configuration assumes minio is running and working. Update `backup.barmanObjectStore` with your minio parameters or your cloud solution. : Restored cluster with tablespaces from object store : Prerequisites: The previous cluster applied and a base backup completed. Remember to update `bootstrap.recovery.backup.name` with the backup name. : For a list of available options, see . Pooler with custom service config :