How to install a PostgreSQL via Helm

This page explains how to install a current PostgreSQL database via the Helm tool on the APPUiO Cloud platform.

This guide is based on the older guide documented here:

Step 1: Install helm

You need first to install the helm CLI tool:

Make sure you add the Bitnami Helm Chart Repository, because we will use later the PostgreSQL Helm chart provided by Bitnami:

helm repo add bitnami

Step 2: Create an adapted YAML file

We use the Bitnami provided PostgreSQL helm chart documented here:

To ensure that PostgreSQL works on APPUiO Cloud we need to adjust some chart parameters, for example the securityContext parameter and the resource limits.

If users don’t explicitly configure limits, the APPUiO Cloud platform injects limits of cpu: 200m and memory: 200Mi. See the reference docs of APPUiO Cloud for more details on default resource limits.

See also the YAML file of the PostgreSQL Helm chart for more details on configurable values.

Create a custom postgresql-values.yaml (filename doesn’t matter) file to override the needed chart parameters.

Below is a full working example for deploying the Bitnami PostgreSQL chart on APPUiO Cloud.

    postgresqlUsername: YOUR_USERNAME (1)

  tag: SOME_IMAGE_TAG (2)

    cpu: 250m
    memory: 256Mi

  size: 1Gi

  enabled: false
    runAsUser: "auto"

  enabled: false

    enabled: false

  enabled: false
1 Set your database user name
2 Set a valid PostgreSQL image tag

By default the storageClass is empty and the APPUiO Cloud platform uses ssd as the default storage class.

See the documentation of available storage classes on APPUiO Cloud for more details.

Step 3: Install the Helm chart with the custom YAML file

Install the PostgreSQL Helm chart with the following command:

helm install -f postgresql-values.yaml --set global.postgresql.postgresqlPassword=<DB_PW> <MY_HELM_INSTANCE_NAME> --version 10 bitnami/postgresql

Replace the <DB_PW> with your database user password.

Replace <MY_HELM_INSTANCE_NAME> with a descriptive name for your Helm installation, for example service-xy-db.

The -f postgresql-values.yaml points to your custom YAML file, overriding the required Chart parameters.

Step 4: Check your installation

You can check your installation with the following command:

helm list