By downloading you acknowledge and agree to the Crunchy Data Terms of Use and Data Collection Notice

  • latest
  • linux
  • amd64/arm64

Crunchy PostgreSQL Operator 5.x

Run your own production-grade PostgreSQL-as-a-Service on Kubernetes!

Prerequisites

Please be sure you have the following utilities installed on your host machine:

  • kubectl
  • git

Step 1: Download the Examples

First, go to GitHub and fork the Postgres Operator examples repository:

https://github.com/CrunchyData/postgres-operator-examples/fork

Once you have forked this repo, you can download it to your working environment with a command similar to this:

YOUR_GITHUB_UN="<your GitHub username>"
git clone --depth 1 "git@github.com:${YOUR_GITHUB_UN}/postgres-operator-examples.git"
cd postgres-operator-examples

Step 2: Install PGO, the Postgres Operator

You can install PGO, the Postgres Operator from Crunchy Data, using the command below:

kubectl apply --server-side -k kustomize/install/namespace
kubectl apply --server-side -k kustomize/install/default

This will create a namespace called postgres-operator and create all of the objects required to deploy PGO.

To check on the status of your installation, you can run the following command:

kubectl -n postgres-operator get pods \
  --selector=postgres-operator.crunchydata.com/control-plane \
  --field-selector=status.phase=Running

If the PGO Pod is healthy, you should see outpout similar to:

NAME                           READY   STATUS    RESTARTS   AGE
pgo-7496657677-jjmcj           1/1     Running   0          3s
pgo-upgrade-6f9f6f79b8-9hc7l   1/1     Running   0          3s

Step 3: Create a Postgres Cluster

Let's create a simple Postgres cluster. You can do this by executing the following command:

kubectl apply --server-side -k kustomize/postgres

This will create a Postgres cluster named hippo in the postgres-operator namespace. You can track the progress of your cluster using the following command:

kubectl -n postgres-operator describe postgresclusters.postgres-operator.crunchydata.com hippo

Next Steps

Want to learn more about the PostgreSQL Operator? Browse through the tutorial to learn more about what you can do!

Tags

docker pull registry.developers.crunchydata.com/crunchydata/postgres-operator:latest

Compressed Size: 81.07