A cloud engineer is tasked with deploying a primary Cloud SQL for PostgreSQL database with Private IP connectivity inside a custom Virtual Private Cloud (VPC), along with a cross-region read replica. What is the correct sequence of administrative steps to provision this infrastructure?
- 1Allocate an internal IP address range in the VPC network using `gcloud compute addresses create` with `--purpose=VPC_PEERING`.
- 2Establish Private Services Access by peering the VPC network with Google services using `gcloud services vpc-peerings connect`.
- 3Create the primary Cloud SQL instance using `gcloud sql instances create` specifying `--no-assign-ip` and `--network`.
- 4Provision the read replica in the destination region using `gcloud sql instances create` with `--master-instance` referencing the primary instance.
Cevap
The correct sequence requires allocating an IP address range for VPC peering first, creating the private services connection between the VPC and Google services second, provisioning the primary Cloud SQL instance with private IP third, and creating the cross-region read replica last.
To deploy Cloud SQL using Private IP, Google Cloud mandates setting up Private Services Access (VPC Peering) first. This process requires allocating a named IP range (`--purpose=VPC_PEERING`) and creating the peering connection (`gcloud services vpc-peerings connect`). Once network connectivity is established, the primary Cloud SQL instance can be created with `--no-assign-ip` and connected to the VPC. Finally, the cross-region read replica is created by referencing the primary instance using `--master-instance`.
Adım Adım Çözüm
Anahtar Kavram
Configuring Cloud SQL Private IP Connectivity and Cross-Region Read Replicas
Tahmini Süre:2m 0s