Skip to main content

Google Cloud Compute Engine and Basic Networking

Introduction​

In this tutorial, we will understand how Linux servers work in a traditional environment and how the same concepts are implemented in Google Cloud Platform (GCP).

This document is designed for beginners who are starting their Google Cloud journey.

  • Core building blocks of Google Cloud (Organization, Folder, Project)
  • How a Linux server maps to a Compute Engine VM
  • Networking basics: VPC, Subnets, Public/Private IPs
  • How AWS and GCP networking differ
  • Hands-on: Create a VM, install Nginx, and open it to the internet via a firewall rule

What is Cloud Computing​

Cloud computing is the practice of using computing resources over the internet — without buying or managing physical hardware.

Typical cloud resources include:

  • Servers
  • Storage
  • Networking
  • Databases
  • Applications

Instead of purchasing and maintaining physical servers, cloud providers offer resources on-demand.

Popular cloud providers:

  • Google Cloud Platform (GCP)
  • Amazon Web Services (AWS)
  • Microsoft Azure

Introduction to Google Cloud Platform​

Google Cloud Platform (GCP) is Google's cloud computing platform.

It provides services such as:

  • Virtual Machines (Compute Engine)
  • Networking (VPC)
  • Storage (Cloud Storage, Persistent Disk)
  • Kubernetes (GKE)
  • Databases (Cloud SQL, Spanner, Firestore)
  • Monitoring (Cloud Monitoring)
  • Security Services (IAM, KMS)

Official Website: cloud.google.com


Create a Google Cloud Account​

To start using Google Cloud:

  1. Create a Google account
  2. Open the Google Cloud Console
  3. Activate the free trial
  4. Create your first project

:::note Free credits Google Cloud provides free credits for new users — great for learning and experimenting. :::

Console Link: refer here


Google Cloud Resource Hierarchy​

Google Cloud organizes resources using a clear hierarchical structure.

Reference: refer here

Hierarchy Structure​

Organization
├── Folder
│ ├── Sub Folder
│ │ └── Project
│ └── Project
└── Project

Organization​

The Organization is the top-level container in Google Cloud.

Example:

company.com

It is usually connected to:

  • Google Workspace
  • Your company domain

Folder​

Folders help organize projects logically. They can also contain nested folders.

Examples:

Production
Development
Testing
Finance
Engineering

Project​

Projects are the main working units in Google Cloud — all resources live inside a project.

Examples of resources inside a project:

  • VM Instances
  • VPC Networks
  • Databases
  • Storage Buckets

I know cloud​

For any cloud platform, Compute and VPC are the two most fundamental services. Once you truly understand these two services, you can confidently say you know that cloud.


Linux Server Basics​

Before creating a VM in Google Cloud, let's revisit the components of a typical Linux server.

A Linux server contains:

  • Operating System
  • CPU
  • RAM
  • Disk / Storage
  • Private IP Address
  • Public IP Address

Operating System​

The OS manages the server's hardware and software.

Examples:

  • Ubuntu
  • CentOS
  • Debian
  • Red Hat Enterprise Linux

CPU and RAM​

  • CPU performs computations.
  • RAM holds temporary running data for applications.

Example specification:

2 vCPU
4 GB RAM

Disk and Storage​

Storage holds:

  • Operating System files
  • Application files
  • Logs
  • Databases

Common types:

  • HDD
  • SSD
  • Persistent Disk (in cloud)

Private IP Address​

Used for internal communication within the network. Not directly reachable from the internet.

Example:

10.0.0.5

Public IP Address​

Used for internet access — allows external users to reach the application.

Example:

34.x.x.x

Mapping a Linux Server to a Google Cloud VM​

In Google Cloud, virtual servers are called Compute Engine Virtual Machines.

A Compute Engine VM is still a Linux server — it just runs in the cloud instead of on a physical machine you own.

Shared Responsibility​

Google Cloud managesYou manage
InfrastructureOperating System
Physical HardwareApplications
NetworkingConfigurations
Hypervisor LayerData

High-Level Networking Introduction​

Why a VM needs networking​

A VM needs networking for:

  • Internal communication
  • Internet access
  • Application access from users
  • Server-to-server communication

Core networking components:

  • VPC
  • Subnets
  • Routes
  • Firewall Rules

Public IP vs Private IP​

TypePurposeReachable from internet?
Private IPInternal communicationNo
Public IPInternet accessYes

What is a VPC​

VPC stands for Virtual Private Cloud — a logically isolated network inside Google Cloud where your resources communicate securely.


AWS vs Google Cloud Networking​

FeatureAWSGoogle Cloud
VPC ScopeRegionalGlobal
Subnet ScopeAvailability Zone specificRegional
Zone SelectionSubnet tied to AZZone selected during VM creation
Same Subnet Across ZonesNoYes

AWS Networking Architecture​

In AWS:

  • VPC is regional
  • Subnets are Availability Zone specific
VPC (us-east-1)
├── Subnet-A (us-east-1a)
└── Subnet-B (us-east-1b)

Google Cloud Networking Architecture​

In Google Cloud:

  • VPC is global
  • Subnets are regional
Global VPC
└── Subnet (us-central1)
├── VM in us-central1-a
├── VM in us-central1-b
└── VM in us-central1-c

:::important Remember this In Google Cloud:

  • A subnet belongs to a region
  • A VM belongs to a zone
  • The same subnet can be used across multiple zones inside the same region :::

VM Networking Flow​

Internet
↓
Public IP
↓
Firewall Rule
↓
VPC Network
↓
Subnet
↓
Virtual Machine

Practical Demo​

Step 1 — Create a VPC Network​

Navigate to:

VPC Network → VPC Networks

Create:

  • Custom VPC
  • Regional Subnet

Example configuration:

VPC Name: demo-vpc
Subnet Name: demo-subnet
Region: us-central1
CIDR: 10.10.0.0/24

Step 2 — Create a Compute Engine VM​

Navigate to:

Compute Engine → VM Instances

Configure the following fields:

  • VM Name
  • Region
  • Zone
  • Machine Type
  • OS Image
  • VPC
  • Subnet
  • Public IP

Example VM configuration​

ComponentValue
Namenginx-server
Regionus-central1
Zoneus-central1-a
OSUbuntu
Machine Typee2-medium
VPCdemo-vpc
Subnetdemo-subnet

Step 3 — Connect to the VM​

Use SSH from the Google Cloud Console.

Update package lists:

sudo apt update

Step 4 — Install Nginx​

sudo apt install nginx -y

Start Nginx:

sudo systemctl start nginx

Enable Nginx to start on boot:

sudo systemctl enable nginx

Verify status:

sudo systemctl status nginx

Step 5 — Try to Access the Application​

Open a browser:

http://PUBLIC_IP

:::warning Expected behavior At this point the application will not load — Google Cloud blocks all incoming traffic by default. We need a firewall rule. :::


Firewall Introduction​

Why a Firewall Rule is Required​

Google Cloud blocks incoming traffic by default. To allow HTTP traffic, port 80 must be opened.

Create a Firewall Rule​

Navigate to:

VPC Network → Firewall

Create the rule with these values:

FieldValue
Nameallow-http
DirectionIngress
TargetsAll instances
Source IP0.0.0.0/0
ProtocolsTCP:80

Firewall Networking Flow​

Internet
↓
Firewall Rule (Allow TCP 80)
↓
VM Instance
↓
Nginx Application

Verify Application Access​

Open the browser again:

http://PUBLIC_IP

The default Nginx welcome page should now load successfully. 🎉


What's Next (Covered in Later Videos)​

This tutorial covered only the basics of firewalls and networking. Advanced topics will be covered in upcoming videos:

  • Firewall Policies
  • Allow / Deny Rules
  • Target Tags
  • Service Accounts
  • Priority Rules
  • Internal Traffic Rules
  • Load Balancer Security
  • Advanced Networking & Security

Diagram Placeholders​

Add the following diagrams to enhance the tutorial:

  • Resource Hierarchy Diagram
  • AWS vs GCP Networking Comparison Diagram
  • VPC and Subnet Architecture Diagram
  • VM Networking Flow Diagram
  • Zone Placement Diagram

Summary​

In this tutorial we:

  1. Understood what cloud computing is and what GCP offers
  2. Explored Google Cloud's resource hierarchy (Organization → Folder → Project)
  3. Mapped Linux server concepts to Compute Engine VMs
  4. Compared AWS and GCP networking models
  5. Created a VPC, subnet, and VM
  6. Installed Nginx and exposed it to the internet via a firewall rule

In the next video, we will dive deeper into firewall policies, advanced VPC features, and real-world networking scenarios.