Skip to content

Install Percona Distribution for PostgreSQL using Helm

Helm is the package manager for Kubernetes. Percona Helm charts can be found in percona/percona-helm-charts repository in Github.

Pre-requisites

Install Helm following its official installation instructions.

Note

Helm v3 is needed to run the following steps.

Installation

  1. Add the Percona’s Helm charts repository and make your Helm client up to date with it:

    $ helm repo add percona https://percona.github.io/percona-helm-charts/
    $ helm repo update
    
  2. Install the Percona Operator for PostgreSQL:

    $ helm install my-operator percona/pg-operator
    

    The my-operator parameter in the above example is the name of a new release object which is created for the Operator when you install its Helm chart (use any name you like).

    Note

    If nothing explicitly specified, helm install command will work with the default namespace and the latest version of the Helm chart.

    • To use different namespace, provide its name with the following additional parameter: --namespace my-namespace.

    • To use different Helm chart version, provide it as follows: --version 1.5.1

  3. Install PostgreSQL:

    $ helm install my-db percona/pg-db
    

    The my-db parameter in the above example is the name of a new release object which is created for the Percona Distribution for PostgreSQL when you install its Helm chart (use any name you like).

Installing Percona Distribution for PostgreSQL with customized parameters

The command above installs Percona Distribution for PostgreSQL with default parameters. Custom options can be passed to a helm install command as a --set key=value[,key=value] argument. The options passed with a chart can be any of the Operator’s Custom Resource options.

The following example will deploy a Percona Distribution for PostgreSQL Cluster in the pgdb namespace, with enabled Percona Monitoring and Management (PMM) and 20 Gi storage for a Primary PostgreSQL node:

$ helm install my-db percona/pg-db --version 1.5.1 --namespace my-namespace \
  --set pgPrimary.volumeSpec.size=20Gi \
  --set pmm.enabled=true

Last update: 2024-05-02