Creating PostgreSQL instances
A PostgreSQL cluster custom resource is a YAML file that defines the PostgreSQL cluster size, configuration, storage, and behavior. Create a cluster custom resource (CR) to create a PostgreSQL instance.
Before you begin
System owner responsibilities
- Configure a suitable
StorageClassfor the tenant environment. For more information, see Configuring storage. - Link the storage class to tenant. For more information, see Handing over configuration files.
- Publish cluster catalog on the Platform capabilities page. For more information, see Configuring cluster.
- Enable the Postgres Operator Catalog setup in Platform capabilities page. For more information, see Setting up Postgres catalog.
Tenant user responsibilities
- An instance of a cluster service is deployed in the workspace. For more information, see Provisioning clusters.
- Access to the created cluster using Red Hat® OpenShift® Console or
ocCLI. For more information, see Accessing clusters. - Deploy the Postgres Operator on tenant cluster. For more information, see Deploying Postgres operator on tenant cluster.
Note: In the following commands, my-postgres is used as an example PostgreSQL cluster name. Replace it with the name of your actual PostgreSQL cluster. Additionally, postgres-namespace is an example namespace and must be replaced with the namespace in which your PostgreSQL cluster is deployed.
Procedure
What to do next
After applying the CR, verify the deployment:
- Check cluster resource status
oc get clusters.pg.ibm.com -n postgres-namespace - Verify that PostgreSQL pods services and PVCs are created
oc describe clusters.pg.ibm.com my-postgres -n postgres-namespace - Verify that the cluster status is Running
oc get pods -n postgres-namespace -l pg.ibm.com/cluster=my-postgres