Start and stop database clusters

Stopping a database cluster pauses the cluster to save resources. You can stop and start database clusters with the Google Distributed Cloud (GDC) air-gapped console or with the gdcloud CLI tool.

Console

  1. From the main menu of the GDC console, choose Database Service.
  2. Select the database cluster to start or stop.
  3. Click STOP or START.

gdcloud CLI

Use the following command to stop a database cluster:

gdcloud database clusters stop CLUSTER_NAME

Use the following command to start a database cluster:

gdcloud database clusters start CLUSTER_NAME

Replace the following:

  • CLUSTER_NAME with the name of the database cluster to start or stop.

API

kubectl patch dbcluster.DBENGINE_NAME.dbadmin.gdc.goog DBCLUSTER_NAME -p '{"spec":{"primarySpec": {"isStopped": IS_STOPPED}}}' --type=merge -n USER_PROJECT

Replace the following variables:

  • DBENGINE_NAME, the name of the database engine. This is one of alloydbomni, postgresql, or oracle.
  • DBCLUSTER_NAME, the name of the database cluster.
  • USER_PROJECT, the name of the user project where the database cluster was created.
  • IS_STOPPED to indicate whether the database cluster should be stopped (true) or not (false).