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
kubectlwith built-in kustomize support via-k) - Access to a running Kubernetes cluster with permissions to create
Namespace,CustomResourceDefinition, andClusterRoleresources
Choose an installation mode
- All namespaces (default)
- Single namespace
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 installed1
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 Expected output:
postgres-operator namespace before the operator Deployment is created.3
Install PGO
Apply the default overlay. The Expected output (resources created on first install):
--server-side flag is required because the CRD manifests exceed the annotation size limit of client-side apply.4
Verify the installation
Wait for the operator pod to reach If the pod is in
Running status: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 ownkustomization.yaml on top of the upstream overlays without modifying the cloned repository. Create a file such as my-install/kustomization.yaml:
Uninstall PGO
To remove the operator while keeping your Postgres clusters intact: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.