Install Percona Operator for PostgreSQL using Helm¶
Helm is the package manager for Kubernetes. A Helm chart is a package that contains all the necessary files to deploy resources or an application to a Kubernetes cluster.
Helm charts for Percona Operator for PostgreSQL include:
You need to install both of them. First you install the Operator Deployment and then you use that to install Percona Distribution for PostgreSQL cluster.
This guide walks you through installing Percona Operator for PostgreSQL with default parameters and names.
To install the Operator with custom parameters or custom resource names, refer to Install Percona Operator for PostgreSQL with customized parameters.
Prerequisites¶
To install and deploy the Operator, you need the following:
- Helm v3 . Run
helm versionto check the version - kubectl command line utility.
-
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.
-
Privileges to create Custom Resource Definitions (CRDs), RBAC resources, and deploy the Operator
Installation¶
Here’s a sequence of steps to follow:
-
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 -
It is a good practice to isolate workloads in Kubernetes via namespaces. Create a namespace:
kubectl create namespace <my-namespace> -
Install the Percona Operator for PostgreSQL:
helm install my-operator percona/pg-operator --namespace <my-namespace>The
my-namespaceis the name of your namespace. Themy-operatorparameter 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). -
Install Percona Distribution for PostgreSQL:
helm install cluster1 percona/pg-db -n <my-namespace>The
cluster1parameter 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). -
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
readystatus: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.
Next steps¶
Created: July 12, 2022