RousselTMLEARNING

Cloud computing

Compute on Google Cloud: Compute Engine, GKE, Cloud Run and Cloud Functions

Choose compute on Google Cloud: Compute Engine VMs and managed instance groups, Google Kubernetes Engine (Standard and Autopilot), Cloud Run for serverless containers, Cloud Run functions, App Engine, and pricing models.

1. Compute Engine #

VMs.

VMs and managed groups #

Google Cloud compute services
Less management to the right, but also less control.
gcloud compute instances create web-1 --zone=europe-west9-a --machine-type=e2-medium \
  --image-family=debian-12 --image-project=debian-cloud --no-address --service-account=web@mon-projet.iam.gserviceaccount.com --scopes=cloud-platform
gcloud compute instance-templates create web-tpl --machine-type=e2-medium --image-family=debian-12 --image-project=debian-cloud --metadata-from-file=startup-script=installer.sh
gcloud compute instance-groups managed create web-mig --template=web-tpl --size=2 --region=europe-west9
gcloud compute instance-groups managed set-autoscaling web-mig --region=europe-west9 --max-num-replicas=10 --target-cpu-utilization=0.6

2. Cloud Run #

Serverless containers.

Principles #

Cloud Run runs an HTTP container (or a job) scaled automatically, down to zero instances, billed per use. Immutable revisions, traffic splitting between revisions (canary), identity through a service account.

gcloud run deploy api --source . --region=europe-west9 --allow-unauthenticated
gcloud run services update-traffic api --region=europe-west9 --to-revisions=api-00002-abc=10,api-00001-xyz=90
gcloud run services logs read api --region=europe-west9 --limit=20

3. GKE and functions #

Kubernetes and events.

Choosing #

ServiceUsage
GKE AutopilotKubernetes where Google manages the nodes; billing per pod
GKE StandardFull control over node pools
Cloud Run functionsFunctions triggered by HTTP, Pub/Sub, Cloud Storage, Eventarc
App EngineHistorical web application platform
Good practice: The official emulators (Pub/Sub, Firestore) and the Functions Framework let you develop these services locally: see the hands-on labs.

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!