This page describes how to test the high availability of an AlloyDB cluster's primary instance by manually forcing it to fail over to the stand-by.
- The Cloud project you are using must have been enabled to access AlloyDB.
- You must have one of these IAM roles in the Cloud project you are using:
roles/alloydb.admin(the AlloyDB Admin predefined IAM role)
roles/owner(the Owner basic IAM role)
roles/editor(the Editor basic IAM role)
If you don't have any of these roles, contact your Organization Administrator to request access.
- In the Google Cloud console, go to the Clusters page.
- Click a cluster in the Resource Name column.
- In the Overview page, go to the Instances in your cluster section, choose the primary instance, and click Failover.
instances failover command to force a primary instance
to fail over its stand-by.
gcloud beta alloydb instances failover INSTANCE_ID \ --region=REGION_ID \ --cluster=CLUSTER_ID \ --project=PROJECT_ID
- INSTANCE_ID: The ID of the instance.
- REGION_ID: The region where the instance is placed.
- CLUSTER_ID: The ID of the cluster where the instance is placed.
- PROJECT_ID: The ID of the project where the cluster is placed.