What Is a VPC in Google Cloud?
Ever wondered how your cloud resources communicate securely and privately at scale? In Google Cloud, that invisible backbone is the VPC.
A Virtual Private Cloud (VPC) is a secure, private, and isolated virtual network inside Google’s massive global network. It allows you to run cloud resources—such as virtual machines (VMs)—in a network that you fully control. Imagine running your own virtual data center that can be deployed across regions and zones – Completely Isolated and Secure.
Importance of VPC in Google Cloud
A Google Cloud VPC enables you to:
- Securely connect compute resources
- Control network traffic
- Isolate environments (dev, test, prod)
- Connect on-premises networks to the cloud
💡 Exam Insight:
If a question mentions networking, isolation, IP addresses, or firewalls, think VPC.
Let’s start with simple Analogy: VPC as an Office Building 🏢
- VPC → Is like company’s private office building inside a big city (the public cloud).
- Subnets → Floors in the building (HR, Finance, Dev)
- Firewall Rules → Security guards at each door
- Routes → Hallways and elevators connecting floors
Everything inside the building is controlled, secure, and isolated.
Core Components (Pillars) of a VPC
🧱 1. Subnets (Regional Network Segments)
Subnets divide a VPC into smaller, manageable network segments, and each subnet belongs to a specific region.
Example:
- Subnet A → us-central1 (Development)
- Subnet B → europe-west1 (Production)
📌 Exam Tip:
VPC is global, but subnets are regional.
🛡️ 2. Firewall Rules (Traffic Control)
Firewall rules define which traffic is allowed or denied to VM instances in a VPC.
They control:
- Inbound traffic (ingress)
- Outbound traffic (egress)
- Ports and protocols (HTTP, HTTPS, SSH, etc.)
Firewall rules act like security guards, ensuring only approved traffic can enter or leave.
📌 Exam Tip:
Firewall rules are stateful and apply at the VM level.
🛣️ 3. Routes (Traffic Pathways)
Routes determine how network traffic travels:
- Between subnets
- To the internet
- To on-premises networks via VPN or Interconnect
Routes ensure traffic takes the correct and secure path.
Example:
🔐 Network Security Rule Configuration
| Direction | Source/Destination | Protocol & Port | Action |
|---|---|---|---|
| Ingress | 192.168.1.0/24 → Internal Load Balancer | TCP:80 | Allowed ✅ |
This rule means HTTP traffic (TCP port 80) from the internal subnet 192.168.1.0/24 to reach an internal load balancer. Let me know if you want more examples or a visual diagram of these rules.
What VPC Connects (Important for CDL Exam)
✔️ Connected through VPC:
- Virtual Machines (Compute Engine)
- GKE clusters
- Internal load balancers
❌ Not inside VPC:
- Cloud Storage buckets (global service)
Now that we have secured the building, how do we route the traffic from the whole world to correct destinations? That is what to be covered in Cloud Load Balancers.
Leave a comment