Skip to content

cloudnative-pg

Introduction

The cloudnative-pg controller is leveraged to deploy multiple PostgreSQL databases which are used for various services within the cluster.

It’s entirely declarative, and directly integrates with the Kubernetes API server to update the state of the cluster — for this reason, it does not require an external failover management tool. — https://cloudnative-pg.io

Example of kind Cluster
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
  name: postgresql
  namespace: my-app
spec:
  instances: 1
  primaryUpdateStrategy: unsupervised
  storage:
    size: 1Gi
  superuserSecret:
      name: postgresql-superuser
    bootstrap:
      initdb:
        database: my-app
        owner: my-app
        secret:
          name: postgresql-user
    monitoring:
      enablePodMonitor: true

Created Resources

Kind Name
Namespace cloudnative-pg
HelmRelease cloudnative-pg