Soru

Zorluk: OrtaDeploying and Configuring Managed Database Instances

A cloud engineer must deploy a new relational database instance named `orders-db` for an e-commerce order management platform in the `us-central1` region. The database requires ACID transactional consistency, high availability across multiple zones within the region, automated daily backups, and strict security compliance prohibiting public IP addresses. The database must connect directly to an existing Virtual Private Cloud (VPC) named `production-vpc`. Which `gcloud` command should the engineer execute to provision this database instance?

  1. gcloud sql instances create orders-db --database-version=MYSQL_8_0 --tier=db-custom-4-15360 --region=us-central1 --availability-type=REGIONAL --network=projects/my-project/global/networks/production-vpc --no-assign-ip --backup-start-time=02:00Cevap
  2. B
    gcloud sql instances create orders-db --database-version=MYSQL_8_0 --tier=db-custom-4-15360 --region=us-central1 --availability-type=REGIONAL --authorized-networks=0.0.0.0/0 --backup-start-time=02:00
  3. C
    gcloud bigtable instances create orders-db --display-name="Orders DB" --cluster=orders-cluster --cluster-zone=us-central1-a --cluster-num-nodes=3 --cluster-storage-type=SSD
  4. D
    gcloud compute instances create orders-db --zone=us-central1-a --machine-type=e2-standard-4 --metadata=database-engine=mysql,ha=true --network=production-vpc

Cevap

The command running `gcloud sql instances create orders-db` with `--availability-type=REGIONAL`, `--network=projects/my-project/global/networks/production-vpc`, and `--no-assign-ip` correctly provisions a managed, highly available Cloud SQL relational database connected exclusively via Private IP.
The correct response provisions a managed Cloud SQL for MySQL instance using `gcloud sql instances create`. Setting `--availability-type=REGIONAL` enables primary and standby instances across multiple zones within `us-central1` for automatic failover. Combining `--network` with `--no-assign-ip` ensures the instance is accessible strictly via Private IP over Private Service Access within the `production-vpc` network, fulfilling all security and functional mandates.

Adım Adım Çözüm

1
Identify the database engine requirements
The requirement specifies a relational database with transactional consistency (ACID) for order management, pointing to Cloud SQL rather than Cloud Bigtable or a custom VM.
Cloud SQL provides managed relational engines (MySQL, PostgreSQL, SQL Server) suitable for transactional e-commerce workloads.
2
Determine high availability and network configuration flags
High availability requires `--availability-type=REGIONAL`. Private VPC access without internet exposure requires `--network=[VPC_PATH]` and `--no-assign-ip`.
The `--no-assign-ip` flag prevents assigning a public IPv4 address, and `--network` provisions the instance within Private Service Access inside the target VPC.
3
Select the compliant command syntax
The command deploying `gcloud sql instances create` with regional availability and `--no-assign-ip` satisfies all architectural and security constraints.
All other options either expose public IPs, select NoSQL database engines, or attempt to create standard Compute Engine VMs.

Anahtar Kavram

Cloud SQL Private IP and Regional High Availability Provisioning
Bu soruyu puanla