1.2 KiB
AlloyDB CLI Usage
AlloyDB resources are managed using the gcloud alloydb command group.
Clusters
-
Create a cluster:
gcloud alloydb clusters create CLUSTER_ID --region=REGION --password=PASSWORD -
List clusters:
gcloud alloydb clusters list --region=REGION -
Get cluster info:
gcloud alloydb clusters describe CLUSTER_ID --region=REGION -
Delete a cluster:
gcloud alloydb clusters delete CLUSTER_ID --region=REGION
Instances
-
Create a primary instance:
gcloud alloydb instances create INSTANCE_ID --cluster=CLUSTER_ID --region=REGION --instance-type=PRIMARY --cpu-count=8 -
Create a read pool instance:
gcloud alloydb instances create INSTANCE_ID --cluster=CLUSTER_ID --region=REGION --instance-type=READ_POOL --read-pool-node-count=2 --cpu-count=2 -
List instances:
gcloud alloydb instances list --cluster=CLUSTER_ID --region=REGION -
Restart an instance:
gcloud alloydb instances restart INSTANCE_ID --cluster=CLUSTER_ID --region=REGION
Backups
-
Create a backup:
gcloud alloydb backups create BACKUP_ID --cluster=CLUSTER_ID --region=REGION -
List backups:
gcloud alloydb backups list --region=REGION