Deploy Postgres from a Helm chart

Contributors ebarcott netapp-bcammett Download PDF of this page

Learn how to deploy Postgres from the Bitnami Helm chart. After you deploy Postgres on your cluster, you can register the application with Astra.

Postgres is a validated app for Astra. Learn the difference between Validated and Standard apps.

Applications deployed from Google Marketplace have not been validated. Some users report issues with discovery and/or backup with Google Marketplace deployments of Postgres, MariaDB, and MySQL.

Requirements

  • A fresh GKE cluster which has been added to Astra.

  • Updated versions of Helm (version 3.2+) and Kubectl installed.

  • Kubeconfig configured using the gcloud tool with a command like gcloud container clusters get-credentials my-cluster-name

Install Postgres

Two important notes on this process:

  • You must deploy your app after the cluster is added to Astra, not before.

  • You must deploy the Helm chart in a namespace other than the default.

Add the Bitnami chart repo:

helm repo add bitnami https://charts.bitnami.com/bitnami

Deploy Postgres with the command:

kubectl create namespace testdb && helm install bitnami/postgresql --namespace testdb --set postgresqlPassword=U9dH9HT4pWS,postgresqlDatabase=test_db --generate-name

This does the following:

  • Creates the testdb namespace.

  • Deploys Postgres on the testdb namespace.

  • Creates a database named test_db

  • Creates a user test_db_user with password U9dH9HT4pWS

This method of setting the password at deployment is insecure. We do not recommend this for a production environment.

After the pods are online, you can manage the app with Astra. Astra allows you to manage an app at the namespace level or using a helm label