Skip to content

Install Percona Distribution for PostgreSQL using Helm

Helm is the package manager for Kubernetes. A Helm chart is a package that contains all the necessary resources to deploy an application to a Kubernetes cluster.

You can find Percona Helm charts in percona/percona-helm-charts repository in Github.

Prerequisites

To install and deploy the Operator, you need the following:

  1. Helm v3 .
  2. kubectl command line utility.
  3. A Kubernetes environment. You can deploy it locally on Minikube for testing purposes or using any cloud provider of your choice. Check the list of our officially supported platforms.

Installation

Here’s a sequence of steps to follow:

  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. It is a good practice to isolate workloads in Kubernetes via namespaces. Create a namespace:

    $ kubectl create namespace <my-namespace>
    
  3. Install the Percona Operator for PostgreSQL:

    $ helm install my-operator percona/pg-operator --namespace <my-namespace>
    

    The my-namespace is the name of your namespace. The my-operator parameter 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).

  4. Install Percona Distribution for PostgreSQL:

    $ helm install cluster1 percona/pg-db -n <my-namespace>
    

    The cluster1 parameter 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).

  5. Check the Operator and replica set Pods status.

    $ kubectl get pg -n <my-namespace>
    

    The creation process is over when both the Operator and replica set Pods report the ready status:

    Expected output
    NAME       ENDPOINT                                   STATUS   POSTGRES   PGBOUNCER   AGE
    cluster1   cluster1-pgbouncer.postgres-operator.svc   ready    3          3           143m
    

You have successfully installed and deployed the Operator with default parameters. You can check them in the Custom Resource options reference.

Next steps

Connect to PostgreSQL

Get expert help

If you need assistance, visit the community forum for comprehensive and free database knowledge, or contact our Percona Database Experts for professional support and services. Join K8S Squad to benefit from early access to features and “ask me anything” sessions with the Experts.


Last update: 2024-11-13