← Back to list

VPC AND COMPUTE ENGINE SIMPLIFIED

Master Google Cloud: Build a Multi-Subnet VM with Secure Networking (Hands-On Lab Walkthrough)

Aduroja Akintade · 2025-04-21 09:15 · 0 claps · 2.0 min read paywalled
#vpc #cloud-computing #cloud #compute-engine #gcp
Open on Medium ↗
Wiki topics: ☁️ · DevOps & Cloud

VPC AND COMPUTE ENGINE SIMPLIFIED

Master Google Cloud: Build a Multi-Subnet VM with Secure Networking (Hands-On Lab Walkthrough)

Are you ready to level up your cloud skills? Let’s break down a real-world Google Cloud lab exercise that combines VPC networking, Compute Engine, and firewall rules into a digestible, LinkedIn-friendly guide. Whether you’re prepping for a certification or just sharpening your cloud expertise, this walkthrough is for you!

Lab Objective Create a secure, scalable VM in a custom VPC network spanning 3 subnets across multiple regions, configured for HTTP/HTTPS traffic and SSH access.

Step-by-Step Guide**

Design Your VPC Network Name: network1 Subnet Creation Mode: Custom (for granular control).

| Subnet | Region | IPv4 Range | | — — — — — — — | — — — — — — — — — — | — — — — — — — — — — -| | my-subnet1 | europe-west10 | 10.0.0.0/24 | | my-subnet2 | europe-west10 | 10.0.1.0/24 | | my-subnet3 | us-central1 | 10.0.3.0/24 |

Why This Matters:

  • Multi-region subnets reduce latency for geographically distributed users.
  • Non-overlapping IP ranges prevent conflicts and ensure seamless communication.

Launch Your Compute Engine VM VM Details:

  • Name: my-vm1
  • Region/Zone: europe-west10 / europe-west10-c
  • Machine Type: n2-standard-4 (4 vCPUs, 16GB RAM — ideal for general-purpose workloads).

Boot Disk:

  • OS: Ubuntu 20.04 LTS (a stable, widely supported Linux distro).
  • Size: 15 GB (sufficient for most small to medium apps).

Networking:

  • Network: network1
  • Subnet: my-subnet1 (Critical: VM and subnet must be in the same region!).
  • Firewall Rules: Enable HTTP (port 80) and HTTPS (port 443) for web traffic.

Secure SSH Access Create a firewall rule to allow SSH:

  • Name: allow-ssh1
  • Network: network1
  • Targets: All instances (flexibility for future scaling).
  • Source IPs: 0.0.0.0/0 (public access — limit this in production).
  • Protocol/Port: TCP port 22 (SSH for remote management)

Key Concepts Explained

VPC & Subnets

  • VPC (Virtual Private Cloud): A logically isolated network for your cloud resources.
  • Subnets: Segments of your VPC’s IP range, tied to specific regions. — Why multiple subnets? For resource organization, security zoning, and regional redundancy.

Firewall Rules

  • HTTP (Port 80): Unencrypted web traffic (e.g., [http://your-site.com](http://your-site.com`)).
  • HTTPS (Port 443): Encrypted traffic (e.g., [https://your-site.com](https://your-site.com`)).
  • SSH (Port 22): Secure shell access for VM administration.

Regions & Zones

  • Regions: Geographic locations (e.g., europe-west10, us-central1).
  • Zones: Isolated data centers within a region (e.g., europe-west10-c). — Best Practice: Deploy critical apps across zones for high availability.

Pro Tips for Success

  1. Security First: Restrict SSH access to specific IP ranges in production.
  2. Cost Control: Use preemptible VMs or sustained-use discounts for non-critical workloads.
  3. Scalability: Pair this setup with Google Kubernetes Engine (GKE) for containerized apps.

Why This Lab Matters This exercise mirrors real-world scenarios where businesses need:

  • Global reach (multi-region subnets).
  • Secure web traffic (HTTPS encryption).
  • Scalable infrastructure (custom VPC + VM configurations).

Your Turn! Try replicating this lab in your Google Cloud account. Questions? Drop a comment below! What’s your biggest challenge while setting up cloud networks?

Tags: #GoogleCloud #CloudComputing #Networking #DevOps #CareerGrowth


메타데이터
post_id
2e2abb9f3e8b
slug
vpc-and-compute-engine-simplified-2e2abb9f3e8b
url
https://medium.com/@cloudrich/vpc-and-compute-engine-simplified-2e2abb9f3e8b
canonical_url
https://medium.com/@cloudrich/vpc-and-compute-engine-simplified-2e2abb9f3e8b
author_url
https://medium.com/@cloudrich
status
ok
fetched_at
2026-06-09 15:37:30