Skip to main content
PGO ships with Kustomize overlays that let you install the operator with a single command. The default overlay deploys PGO to the postgres-operator namespace and grants it access to manage PostgresCluster resources across every namespace in your cluster. A single-namespace overlay is also available if you want to restrict the operator to one namespace.
The default installation pulls container images from the Crunchy Data Developer Portal. These images are subject to the Crunchy Data Developer Program terms of use. Register for a free account before proceeding.

Prerequisites

Before you install PGO, make sure you have the following tools available:
  • kubectl v1.24 or later, configured to talk to your cluster
  • kustomize v5.0 or later (or kubectl with built-in kustomize support via -k)
  • Access to a running Kubernetes cluster with permissions to create Namespace, CustomResourceDefinition, and ClusterRole resources

Choose an installation mode

In all-namespaces mode, PGO watches every namespace for PostgresCluster, PGUpgrade, and PGAdmin resources. This is the recommended mode for most installations.The default overlay uses a ClusterRole and ClusterRoleBinding, so the operator service account has cluster-wide access.What gets installed
1

Fork and clone the examples repository

The official install overlays live in the postgres-operator-examples repository. Fork it so you can version-control any customizations.
2

Create the operator namespace

Apply the namespace overlay first. This creates the postgres-operator namespace before the operator Deployment is created.
Expected output:
3

Install PGO

Apply the default overlay. The --server-side flag is required because the CRD manifests exceed the annotation size limit of client-side apply.
Expected output (resources created on first install):
4

Verify the installation

Wait for the operator pod to reach Running status:
If the pod is in ImagePullBackOff, confirm that your nodes can reach the Crunchy Data registry and that you have a valid Developer Portal account.

Customize the installation

You can layer your own kustomization.yaml on top of the upstream overlays without modifying the cloned repository. Create a file such as my-install/kustomization.yaml:
Then apply your overlay:

Uninstall PGO

Deleting the operator does not delete existing PostgresCluster resources or their data. The clusters continue running until you explicitly delete them. If you also remove the CRDs, Kubernetes will garbage-collect all custom resource objects and the associated PVCs may be lost.
To remove the operator while keeping your Postgres clusters intact:
To also remove the CRDs (this deletes all PostgresCluster, PGUpgrade, and PGAdmin objects):

Next steps

Create your first cluster

Deploy a production-grade Postgres cluster with high availability.

Install with Helm

Prefer Helm? Use the Crunchy Data chart for a values-driven install.

Configure feature gates

Enable alpha and beta features in the operator.

PostgresCluster reference

Full API reference for the PostgresCluster custom resource.