Member-only story

Postgres Deployment with CloudNativePG

DaeGon Kim
Dev Genius
Published in
4 min read6 days ago

In the previous two articles, we deploy PostgresSQL databases using manifest files and helm package manager. Another way to deploy them is using Kubernetes operators. There are many Postgres operators such as Zalando Postgres Operator, Crunchy Data Postgres Operator (PGO), Percona Operator for Postgres, CloudNativePG, PostgresSQL Operator by KubeDB, Stackgres Operator. These operators aim to provide various features: backup/restore, HA (highly available) features, failure recovery, connection pooling, monitoring and other enterprise-grade features.

In this article, we provide steps to deploy CloudNativePG operator and set up a Postgres cluster using it.

CloudNativePG Helm Installation

The following sequence of helm commands will deploy CloudNativePG operator.

helm repo add cnpg https://cloudnative-pg.github.io/charts
helm repo update cnpg
helm search repo cnpg
helm fetch cnpg/cloudnative-pg --version 0.23.0 --untar
helm upgrade --install -n cnpg cnpg ./cloudnative-pg \
--values ./override.yaml --create-namespace

The override values is shown below.

---
rbac:
aggregateClusterRoles: true

Various installed components are shown with associated the commands.

Installed components by CloudNativePG

Postgres Cluster…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

No responses yet

Write a response