GCP - Associate Cloud Engineer Study Guide

    2: Planning and implementing a cloud solution

    This chapter places workloads onto the landing zone built in the previous chapter. It covers compute selection across Compute Engine, Google Kubernetes Engine, Cloud Run, and Cloud Run functions; instance shapes, Spot, and managed instance groups; storage and database choice; network construction with VPCs, firewalls, load balancers, peering, and Cloud NAT; and the infrastructure-as-code patterns that hold the whole thing together.

    Learning Objectives

    By the end of this chapter, you will be able to:

    • Match a workload to Compute Engine, Google Kubernetes Engine, Cloud Run, or Cloud Run functions and install the tooling each surface needs.
    • Apply Spot VMs and custom machine types where the discount or shape justifies the trade-off, and deploy containerized applications behind Google Cloud load balancers.
    • Launch a Compute Engine instance with the correct availability policy, SSH key path, and resource-location placement, and deploy event-driven services on Cloud Run and Cloud Run functions.
    • Choose between zonal Persistent Disk, regional Persistent Disk, and Hyperdisk for VM storage, route ingress through the right Network Service Tier, and wire applications to Pub/Sub, Cloud Storage object change notifications, and Eventarc.
    • Build autoscaled managed instance groups from instance templates, decide between Cloud Run fully managed, Cloud Run for Anthos, and Cloud Run functions, and stand up custom-mode and Shared VPC networks with subnets.
    • Configure OS Login at the Project or instance level, pick the right managed database across Cloud SQL, BigQuery, Firestore, Spanner, Bigtable, and AlloyDB, and author ingress and egress firewall rules with tags or service-account targets.
    • Operate VM Manager for OS inventory, patch deployments, and configuration policies, pick the right object storage class, and peer external networks via Cloud VPN or VPC Network Peering.
    • Deploy GKE Autopilot, regional, private, and GKE Enterprise clusters, place managed data products on top, and codify the lot with the Cloud Foundation Toolkit, Config Connector, Terraform, or Helm.

    Executive Summary

    • Compute placement on Google Cloud is a five-way decision: full virtual machines on Compute Engine, container orchestration on Google Kubernetes Engine, request-driven containers on Cloud Run services, run-to-completion containers on Cloud Run jobs, and snippet handlers on Cloud Run functions. The right choice flows from cold-start tolerance, runtime control, and traffic shape, not personal preference.
    • Cost discipline on Compute Engine comes from three knobs: Spot VMs for restart-tolerant workloads, custom machine types for non-standard CPU-to-memory ratios, and committed-use discounts on baseline replicas in a managed instance group.
    • Storage choice on Google Cloud has two axes. For VM block storage the axis is durability scope (zonal Persistent Disk, regional Persistent Disk, or Hyperdisk) and IOPS shape. For object storage the axis is access frequency (Standard, Nearline, Coldline, Archive) and replication footprint (region, dual-region, multi-region).
    • Network design centers on a custom-mode VPC with explicit subnets, Shared VPC where multiple Projects need shared connectivity, firewall rules targeted by network tags or service accounts, and peering via Cloud VPN, Cloud Interconnect, or VPC Network Peering for non-VPC neighbors.
    • The control plane sitting on top of all of this is infrastructure as code. Terraform with the google provider is the broadest path, the Cloud Foundation Toolkit gives opinionated organization-scale blueprints, Config Connector reconciles Google Cloud resources as Kubernetes objects, and Helm packages Kubernetes manifests for repeatable application installs.

    Assumptions

    • The Organization, Folder, Project, Cloud Identity, billing, and observability scaffolding from the previous chapter is already in place. This chapter assumes a Shared VPC host project named host-net-prod and at least one service project named svc-app-prod.
    • All gcloud commands assume a default project, region, and zone configuration loaded via gcloud config configurations activate ace-dev. Region examples use europe-west4; zone examples use europe-west4-a. Substitute your own.
    • Terraform examples use the google and google-beta providers with state in a Cloud Storage bucket named tf-state-ace. Helm examples use chart version pinning and namespace isolation.
    • All discounted-pricing or capacity figures are illustrative of the published pricing model at the time of generation; treat the figures in the Pricing Calculator and product documentation as the source of truth.

    Sections in this chapter

    1. Free
    2. Free with account
    3. Free with account
    4. Free with account
    5. Free with account
    6. Free with account
    7. Free with account
    8. Free with account
    9. Free with account