Careeroza
VPC Networks
Virtual Private Cloud
A VPC is your private network in Google Cloud. GCP VPCs are global: one network can have subnets in many regions, and VMs in different regions talk over Google's private backbone.
Example
A custom-mode VPC with one subnet in Mumbai:
gcloud compute networks create shop-vpc --subnet-mode=custom
gcloud compute networks subnets create shop-asia \
--network=shop-vpc --region=asia-south1 --range=10.10.0.0/20 \
--enable-private-ip-google-accessExample output
Created [.../global/networks/shop-vpc]. NAME REGION NETWORK RANGE shop-asia asia-south1 shop-vpc 10.10.0.0/20
Private Connectivity
| Need | Use |
|---|---|
| VMs without public IPs reach the internet | Cloud NAT |
| private VMs reach Google APIs | Private Google Access |
| Cloud Run reaches private resources (Cloud SQL private IP, Redis) | Direct VPC egress / Serverless VPC connector |
| connect to an on-premises network | Cloud VPN or Cloud Interconnect |
| connect two VPCs | VPC Network Peering |