RousselTMLEARNING

Cloud computing

Google Cloud networking: global VPC, subnets, firewall and load balancing

Design networking on Google Cloud: global VPC and regional subnets, firewall rules based on tags and service accounts, Cloud NAT, private access to Google APIs, Shared VPC, peering, Cloud Load Balancing, Cloud CDN, Cloud DNS and hybrid connectivity.

1. VPC and subnets #

A global network.

Principles #

Google Cloud VPC
VMs in two regions communicate over private addresses without peering or VPN.
gcloud compute networks create prod --subnet-mode=custom
gcloud compute networks subnets create paris --network=prod --region=europe-west9 --range=10.10.0.0/20 --enable-private-ip-google-access
gcloud compute routers create r-paris --network=prod --region=europe-west9
gcloud compute routers nats create nat-paris --router=r-paris --region=europe-west9 --auto-allocate-nat-external-ips --nat-all-subnet-ip-ranges

2. Firewall #

Rules at the VPC level.

Rules #

VPC firewall rules apply to VMs based on network tags or service accounts, with priority, direction (ingress/egress) and action. Hierarchical firewall policies apply to a whole organization or folder.

gcloud compute firewall-rules create autoriser-lb-web --network=prod --direction=INGRESS --action=allow \
  --rules=tcp:8080 --source-ranges=35.191.0.0/16,130.211.0.0/22 --target-service-accounts=web@mon-projet.iam.gserviceaccount.com
Health checks: The 35.191.0.0/16 and 130.211.0.0/22 ranges are those used by Google's health checks and load balancers.

3. Load balancing and connectivity #

Exposing and connecting.

Services #

NeedService
Global web applicationGlobal external application load balancer + Cloud CDN + Cloud Armor
Regional TCP/UDP trafficNetwork load balancer
Several projects, one common networkShared VPC
Private access to managed servicesPrivate Service Connect
Connecting the company siteCloud VPN (HA VPN) or Cloud Interconnect

Related articles

Observability on Google Cloud: Cloud Monitoring, Logging, Trace, Profiler and Managed Prometheus

A complete overview of Google Cloud Observability: Cloud Monitoring, Cloud Logging (router, sinks, Log Analyt…

Understanding Google Cloud: regions, projects, hierarchy, tools and pricing

Google Cloud basics: regions and zones, the organization, folders and projects hierarchy, APIs to enable, con…

IAM on Google Cloud: roles, service accounts and organization policies

Manage access on Google Cloud: principals, basic, predefined and custom roles, IAM bindings, service accounts…

Keep learning

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!