Skip to content

How to stop a Stackgres Cluster

Usually when I need to shutdown a namespace (for example, during the night when it is not been used), I do it by changing the replicas field in deployments and statefulsets in this namespace to 0.

In SGCluster, the number of instances is determined by the field instances in the spec. but when I try to set this field to 0, I get the following error: spec.instances in body should be greater than or equal to 1

Is there a way to perform stop and start operations, like those of pg_ctl, so that after a stop operation there will be no active pods for the cluster, until a start operation will be performed?