DEV Community

Cover image for Google Cloud VMs and Networking
Alex Nyambura
Alex Nyambura Subscriber

Posted on

Google Cloud VMs and Networking

In Google Cloud, every Virtual Machine (VM) must be connected to a Virtual Private Cloud (VPC) network. If there’s no VPC, you can’t launch a VM.

Basics

  1. VPC - A global, isolated virtual network within your GCP project. It spans all regions.
  2. Subnets are regional; each region must have its own subnet to launch resources like VMs
  3. VMs are always launched inside a subnet, which belongs to a VPC.

Even though subnets are regional, a VPC itself is global. That means VMs in different regions (but within the same VPC) can communicate with each other internally, without needing external IP addresses or a VPN.

Firewall Rules

  1. Firewall rules in GCP apply at the network level, not the individual VM.
  2. Default behaviour: all incoming traffic is denied by default.
  3. You must explicitly allow traffic

Learn More

Top comments (0)