Managing Compute: GCE, GKE & Cloud Run
Google ACE ACE · Ensuring the successful operation of a cloud solution
Operations: keeping compute running
Deploying resources is only half the job. The operations section of the exam covers what happens afterward: connecting to VMs, viewing the running inventory, taking snapshots and building images, managing GKE clusters and their workloads, and running Cloud Run services through new versions and traffic changes. These are the tasks a cloud engineer performs weekly, and the exam tests them as procedures — which command, which console page, which order of steps.
Managing Compute Engine
Day-to-day VM management starts with connecting to instances: the console's SSH button, gcloud compute ssh, or the serial console for a VM that has lost network connectivity. Viewing the running inventory — instance IDs, machine types, zones, and statuses — is done with gcloud compute instances list or the console's VM instances page, with filters for project, zone, or label. When a VM misbehaves, the first checks are its status, its serial port output (for boot problems), and its metrics in Cloud Monitoring.
Snapshots are point-in-time backups of a Persistent Disk. They are incremental (only changed blocks are stored after the first snapshot), stored redundantly, and can be scheduled with snapshot policies so backups happen automatically. A snapshot can restore a disk to its earlier state, create a new disk (in the same or a different zone), or serve as the source for a new image. Snapshots can be scheduled, viewed, and deleted in the console or with gcloud commands; deleting a snapshot does not affect other snapshots in the chain, because the system preserves the blocks other snapshots still need. Images are the bootable counterpart: a custom image is created from a VM or a snapshot and used to boot new VMs with pre-installed software and configuration. The standard workflow is to configure a VM once, create an image from it, and use that image in instance templates so every new VM starts identically configured. Images can be shared across projects and, with the right permissions, across organizations.
Managing GKE
GKE operations center on the cluster and its workloads. Viewing cluster inventory means listing nodes, Pods, and Services with kubectl (kubectl get nodes, kubectl get pods, kubectl get services) or in the console's Kubernetes Engine pages. Node pools are groups of nodes with the same configuration inside a cluster; you add, edit, or remove them as workload needs change — for example, adding a GPU node pool for a machine-learning workload, or removing a pool that is no longer needed. In Autopilot clusters, node pools are managed by Google and you do not manage them directly. Configuring GKE to access Artifact Registry is a permissions task: the nodes' service account needs the Artifact Registry Reader role on the repository, as covered in the deployment guide.
Two autoscaling mechanisms matter for GKE. Horizontal Pod Autoscaling (HPA) changes the number of Pod replicas based on CPU utilization, memory utilization, or a custom metric — it scales the workload out and in. Vertical Pod Autoscaling (VPA) changes the CPU and memory requests and limits of Pods based on observed usage — it resizes the workload. They solve different problems: HPA handles variable load, VPA handles wrong-sized requests. They should not both manage the same metric on the same workload, because they would fight each other. The exam tests the distinction: "the application needs more replicas during peak hours" is HPA; "the Pods keep getting killed for exceeding their memory limit" is a VPA (or manual request-adjustment) problem. Working with Kubernetes resources — creating, updating, and deleting Pods, Services, and StatefulSets — is done with kubectl apply and kubectl delete, and StatefulSets are the workload type for stateful applications that need stable network identities and persistent storage per Pod.
Managing Cloud Run
Cloud Run operations revolve around revisions and traffic. Deploying a new version creates a new revision; the service keeps serving the old revision until you direct traffic to the new one. Traffic splitting lets you send a percentage of requests to each revision — the mechanism for canary releases and instant rollbacks. Scaling parameters control how the service autoscale: minimum instances (kept warm to avoid cold starts), maximum instances (a cap for cost or downstream protection), and concurrency (requests per instance). Adjusting these is a routine operations task: raising the maximum before a marketing launch, or lowering the minimum overnight to save money. Cloud Run revisions can also be tagged with a unique URL for testing before they receive production traffic.
Autohealing and health checks in managed instance groups
A managed instance group's autohealing keeps the group healthy without human intervention: the group runs a health check against each VM (an HTTP check against an endpoint, or a TCP check against a port), and if a VM fails the check, the group automatically deletes and recreates it. Autohealing is configured by attaching a health check to the group, and it is distinct from the load balancer's health check — although the two often use the same check, they serve different purposes: the load balancer stops sending traffic to an unhealthy VM, while autohealing replaces it. The initial delay setting matters: a VM that takes three minutes to start its application should not be health-checked at one minute, or the group will kill healthy VMs before they are ready. The exam's scenario is usually a VM that is running but not serving traffic — the fix is autohealing with a well-tuned health check, not a bigger VM or a manual restart.
Related to autohealing is the group's update policy: when a rolling update replaces VMs, the policy controls how many VMs can be unavailable at once (maxUnavailable) and how many extra VMs can be created temporarily (maxSurge). A policy with maxUnavailable set to zero and a surge of one keeps the service at full capacity throughout the update, at the cost of a temporary extra VM. A policy that replaces half the group at once is faster but riskier. The exam tests the trade-off: a production service with strict availability requirements needs a conservative update policy, while a development environment can update aggressively.
Rolling back a GKE deployment
Deployments in Kubernetes keep a revision history, and rolling back is a standard operations task: kubectl rollout undo deployment/my-app returns the Deployment to its previous revision, and kubectl rollout status shows whether a rollout is progressing or stuck. A rollout can also be paused (kubectl rollout pause) to inspect a partially updated deployment before deciding whether to continue or roll back. The exam point is that rollbacks are built into Deployments — you do not need to re-apply the old manifest, although that also works. The same revision-history idea appears in Cloud Run (revisions and traffic splitting) and in managed instance groups (rolling back to a previous instance template). Across all three platforms, the pattern is identical: keep the old version available, shift traffic or replicas gradually, and roll back instantly if the new version misbehaves.
Exam traps to watch for
- Confusing snapshots with images: snapshots back up disks; images boot new VMs. A snapshot can be the source of an image, but they are not the same thing.
- Using HPA and VPA on the same metric: HPA scales replica count, VPA resizes requests — they conflict if both manage the same resource.
- Forgetting that deleting a snapshot does not break other snapshots: the chain preserves the blocks still needed.
- Assuming a new Cloud Run revision receives traffic automatically: traffic only moves when you split or shift it.
Practice questions
Test yourself on this guide. Answers are checked instantly, with a full explanation for each question.
Q1.A VM's boot disk was corrupted by a bad software update. The team has a snapshot of the disk from before the update. What is the correct recovery approach?
Explanation: A snapshot can be used to create a new disk with the data as it was when the snapshot was taken — the standard recovery path. Deleting the snapshot destroys the backup. Resizing the disk does not repair corruption. Creating an image from the corrupted disk just preserves the corruption in bootable form.
Exam objective: ACE exam guide 3.1: Managing compute resources — working with snapshots
Q2.A team wants every new VM in a managed instance group to start with the same software and configuration, without running installation steps at boot time. What should they do?
Explanation: A custom image captures a fully configured VM, and using it in the instance template means every VM the group creates boots already configured — no install step at boot. Snapshots back up disks; they do not boot VMs. A startup script works but runs installation on every boot, which is slower and can fail. A single Persistent Disk cannot be attached to multiple VMs as a boot disk.
Exam objective: ACE exam guide 3.1: Managing compute resources — working with images
Q3.A GKE application receives much more traffic during business hours than at night, and the team wants the number of Pods to adjust automatically. Which mechanism should they configure?
Explanation: Horizontal Pod Autoscaling changes the replica count based on observed load — the right tool for traffic that varies by time of day. Vertical Pod Autoscaling resizes resource requests; it does not change the number of Pods. The node pool autoscaler adds nodes, not Pods, and would not help if the Pod count stays fixed. A PodDisruptionBudget limits voluntary disruptions; it does not scale anything.
Exam objective: ACE exam guide 3.1: Managing compute resources — managing Horizontal and Vertical autoscaling configurations
Q4.Pods in a GKE cluster keep getting killed with OOMKilled errors (out of memory), even though the nodes have free memory. What is the most likely cause, and what should the team adjust?
Explanation: OOMKilled means a container exceeded its own memory limit — the limit is enforced per container regardless of how much memory the node has free. The fix is to raise the memory request and limit, or let VPA size them from observed usage. More nodes do not help because the limit is per Pod, not per node. HPA adds replicas; it does not raise memory limits. The Kubernetes version is unrelated.
Exam objective: ACE exam guide 3.1: Managing compute resources — managing Horizontal and Vertical autoscaling configurations
Q5.A Cloud Run service has a new revision deployed, but production traffic is still going to the old revision. The team wants to move 100% of traffic to the new revision. What should they do?
Explanation: Traffic is controlled by the traffic split: setting the new revision to 100% moves all requests to it, and the old revision stays available for an instant rollback. Deleting the old revision would remove the rollback target. Instance counts control scaling, not routing. Redeploying under a new name creates a different service with a different URL.
Exam objective: ACE exam guide 3.1: Managing compute resources — adjusting application traffic splitting parameters
Q6.A GKE cluster runs a new machine-learning workload that needs GPU nodes. The existing node pools use general-purpose machine types. What should the team do?
Explanation: Node pools are groups of nodes with a uniform configuration, and adding a GPU node pool is the standard way to introduce a new machine type into a cluster. Node pool machine types cannot be changed in place — the pool must be recreated. A second cluster is unnecessary when one cluster can host multiple node pools. HPA scales Pods; it does not provide GPUs.
Exam objective: ACE exam guide 3.1: Managing compute resources — working with node pools
Q7.A VM will not boot, and SSH connections fail. The team needs to see the boot messages to diagnose the problem. What should they do?
Explanation: The serial console output shows the VM's boot log and kernel messages even when the network and SSH are unavailable — the right diagnostic for a boot failure. Changing the machine type does not diagnose anything. A snapshot backs up the disk but shows no logs. Repeated restarts without diagnosis waste time and may not help.
Exam objective: ACE exam guide 3.1: Managing compute resources — remotely connecting to the instance; viewing current running VM inventory
Q8.A Cloud Run service suffers slow first requests in the morning after idle overnight periods (cold starts). Traffic is low but latency-sensitive. What should the team configure?
Explanation: Minimum instances keep a set number of container instances warm and ready, eliminating cold starts at the cost of paying for idle capacity — the right trade-off for a latency-sensitive service. A maximum of 1 would hurt availability during spikes. The request timeout does not affect startup latency. Lower concurrency increases the number of instances needed, not the warmup behavior.
Exam objective: ACE exam guide 3.1: Managing compute resources — setting scaling parameters for autoscaling instances