Skip to content

Professional Cloud DevOps Engineer · Domain 3: Applying site reliability engineering practices · 18% of the exam

Task 3.2: Managing service lifecycle.

Planning, deploying, maintaining and retiring services, capacity planning with quotas, reservations and Dynamic Workload Scheduler, autoscaling MIGs, Cloud Run and GKE, and feedback loops.

Study it

Sample questions

Try each one before opening the answer. Every option is explained, with the Google Cloud documentation page that proves it.

Question 1 · choose 1

An ML platform team must fine-tune a model on 32 GPUs for 10 days, starting at 08:00 on a fixed date five weeks from now so that the result is ready for a product launch. It holds no GPU reservations today, and finance will not pay for GPUs in the weeks before the run. How should the team plan the capacity?

  1. AA future reservation request in calendar mode for the GPUs, from the start date for 10 days
  2. BA GKE node pool that uses flex-start, created on the start date with the training Job queued on it
  3. CSpot VMs with the GPUs attached, created on the start date with checkpoints written to Cloud Storage
  4. DAn on-demand reservation for the GPU VMs, made today and deleted after the run
Show the answer and why
  • AA future reservation request in calendar mode for the GPUs, from the start date for 10 days

    Correct

    Calendar mode, which uses Dynamic Workload Scheduler, provisions approved GPU capacity at the specified date and time for 1 to 90 days, and availability can be checked up to 60 days ahead.

  • BA GKE node pool that uses flex-start, created on the start date with the training Job queued on it

    Incorrect

    Flex-start is for time-flexible work: it is not bound to a specific start time and provisions capacity for up to seven days, short of the 10-day run.

  • CSpot VMs with the GPUs attached, created on the start date with checkpoints written to Cloud Storage

    Incorrect

    Spot capacity is not assured and can be preempted at any time, so neither the start time nor the 10-day run is protected.

  • DAn on-demand reservation for the GPU VMs, made today and deleted after the run

    Incorrect

    An on-demand reservation is charged like running VMs for as long as it exists, so the company pays for idle GPUs for five weeks.

Dynamic Workload Scheduler offers two ways to get scarce accelerators: flex-start, for short, time-flexible jobs of up to seven days, and calendar mode future reservations, which deliver approved capacity at a chosen date and time for up to 90 days. A fixed start date and a 10-day run point to calendar mode.

Question 2 · choose 1

A single-threaded image-processing service runs on Cloud Run with 4 vCPUs and 16 GiB per instance, because each request needs a lot of memory. Under load, latency climbs and requests queue, yet Cloud Run starts few new instances and the service's CPU utilization chart stays around 30%. The maximum instances limit is far from reached. What change makes the service scale out with the load?

  1. ARaise the maximum instances setting so that the autoscaler has more room to add instances
  2. BGive each instance 8 vCPUs so that the busy requests get more processing power
  3. CLower the maximum concurrent requests per instance so that request throughput drives the scaling
  4. DSet a minimum number of instances equal to the usual daytime instance count to keep them warm
Show the answer and why
  • ARaise the maximum instances setting so that the autoscaler has more room to add instances

    Incorrect

    The service is not hitting that limit; the autoscaler is simply not asking for more instances, so a higher ceiling changes nothing.

  • BGive each instance 8 vCPUs so that the busy requests get more processing power

    Incorrect

    A single-threaded process still uses one vCPU at a time, so more vCPUs lower the average utilization further and scaling stays weak.

  • CLower the maximum concurrent requests per instance so that request throughput drives the scaling

    Correct

    With one vCPU maxed and the others idle, average CPU looks low and CPU-based scaling stalls; lowering concurrency forces scaling on request throughput.

  • DSet a minimum number of instances equal to the usual daytime instance count to keep them warm

    Incorrect

    Minimum instances keep a fixed floor of warm instances; they do not make the service add instances as the load rises above that floor.

Cloud Run's CPU autoscaling looks at average utilization across all vCPUs of an instance. A single-threaded app on a multi-vCPU instance creates a vCPU hotspot that keeps the average low, so the documented fix is to lower maximum concurrency, which makes scaling follow request throughput and cuts per-instance queuing.

Question 3 · choose 1

A managed instance group serves an API whose VMs need about eight minutes to initialize. Load rises steeply each weekday morning and the timing drifts with the seasons. The CPU-based autoscaler adds VMs only after the load has arrived, so users see slow responses every morning. The team does not want to maintain timetables by hand. What should it enable?

  1. AA lower target CPU utilization, so the group always runs with spare capacity
  2. BScaling schedules for weekday mornings, revised by the team as the seasons change
  3. CPredictive autoscaling on the group's CPU utilization signal
  4. DA longer initialization period, so new VMs are left out of the autoscaler's decisions
Show the answer and why
  • AA lower target CPU utilization, so the group always runs with spare capacity

    Incorrect

    More headroom costs money all day and the autoscaler still reacts only to observed load, so a steep rise can still outrun eight-minute startups.

  • BScaling schedules for weekday mornings, revised by the team as the seasons change

    Incorrect

    Schedules allocate capacity for anticipated loads, but they are the hand-maintained timetables the team wants to avoid.

  • CPredictive autoscaling on the group's CPU utilization signal

    Correct

    Predictive autoscaling forecasts load from the group's history and scales out in advance, which suits apps with long initialization and daily or weekly cycles.

  • DA longer initialization period, so new VMs are left out of the autoscaler's decisions

    Incorrect

    The initialization period only tells the autoscaler to ignore metrics from VMs that are still starting; it does not start VMs any earlier.

A reactive autoscaler adds VMs after load is observed, which is too late when VMs take minutes to start. Predictive autoscaling uses the MIG's history to scale out ahead of forecasted load, alongside real-time signals, so new VMs are ready when the morning load arrives.

Question 4 · choose 1

A regional managed instance group autoscales on CPU, and its VMs need about ten minutes to initialize. Traffic often dips for a few minutes and then spikes again; after each dip the autoscaler removes many VMs at once, and the new VMs it adds for the next spike are not ready in time. What should the team configure on the autoscaler?

  1. AA lower CPU utilization target, so that the group always runs with more spare capacity
  2. BA shorter initialization period, so that new VMs count toward serving capacity sooner
  3. CAutoscaling mode set to only scale out, so that the group never removes VMs on its own
  4. DScale-in controls with a maximum allowed reduction over a trailing time window
Show the answer and why
  • AA lower CPU utilization target, so that the group always runs with more spare capacity

    Incorrect

    A lower target raises the steady size but still lets the autoscaler drop unneeded VMs in one step after each dip.

  • BA shorter initialization period, so that new VMs count toward serving capacity sooner

    Incorrect

    Shortening the period only changes how the autoscaler treats new VMs; it does not make them ready faster.

  • CAutoscaling mode set to only scale out, so that the group never removes VMs on its own

    Incorrect

    The group would never shrink after traffic falls, so the team pays for peak capacity all the time.

  • DScale-in controls with a maximum allowed reduction over a trailing time window

    Correct

    Scale-in controls limit how many VMs can be removed from the peak size within the trailing window, so capacity stays for a spike that follows a short decline.

Without scale-in controls, the autoscaler removes all unneeded VMs in one step after the stabilization period, which hurts workloads with long initialization times. Scale-in controls set a maximum allowed reduction (maxScaledInReplicas) within a trailing time window (timeWindowSec), so the group never shrinks below the peak size minus that reduction.

Question 5 · choose 1

A GKE cluster in the Regular channel has stayed on its minor version while other clusters moved on. A deprecation insight shows that a tool still calls an API removed in the next minor version. The team updates the tool today, and the next minor version is already the channel's auto-upgrade target. When will GKE upgrade the cluster to it automatically?

  1. ARight away, because GKE checks for deprecated API calls again at the start of each maintenance window
  2. BOnly after someone dismisses the deprecation insight in the console, which clears the pause on the cluster
  3. CAfter GKE has detected no calls to the deprecated API for 30 days, if nothing else blocks that upgrade
  4. DNever, because a paused cluster stays on its minor version until someone upgrades its control plane manually
Show the answer and why
  • ARight away, because GKE checks for deprecated API calls again at the start of each maintenance window

    Incorrect

    GKE resumes automatic minor upgrades only after it has seen no usage of the deprecated feature or API for 30 days.

  • BOnly after someone dismisses the deprecation insight in the console, which clears the pause on the cluster

    Incorrect

    The pause ends when GKE stops detecting the deprecated usage, not when someone acts on the insight.

  • CAfter GKE has detected no calls to the deprecated API for 30 days, if nothing else blocks that upgrade

    Correct

    Once GKE has not detected the deprecated usage for 30 days, the cluster is upgraded automatically if the next minor version is its auto-upgrade target and nothing else prevents it.

  • DNever, because a paused cluster stays on its minor version until someone upgrades its control plane manually

    Incorrect

    Automatic upgrades resume on their own once the deprecated usage has not been seen for 30 days.

When GKE detects use of a feature or API removed in the next minor version, it pauses automatic upgrades to that minor version, keeps delivering patch upgrades, and shares a deprecation insight and recommendation. After 30 days with no detected usage, automatic minor upgrades resume. GKE cannot guarantee it detects every use, so teams must still review deprecations themselves.

Question 6 · choose 1

A team reserved 40 VMs of a machine type in one zone for a quarterly batch run. When the run starts, only 25 reserved VMs are left, because other workloads in the project with the same machine type consumed the rest of the reservation. How should the reservation and the batch VMs be set up?

  1. AMake it a specific reservation with --require-specific-reservation, and target it from the batch VMs by name
  2. BKeep the automatic reservation but share it with a new batch project, and run the batch VMs in that project
  3. CKeep the automatic reservation and raise its VM count to 60, so that enough VMs remain after other workloads take theirs
  4. DKeep the automatic reservation and create the batch VMs with --reservation-affinity=any at the start of each run
Show the answer and why
  • AMake it a specific reservation with --require-specific-reservation, and target it from the batch VMs by name

    Correct

    A specifically targeted reservation is consumed only by VMs that match its properties and name it, so other workloads cannot use it.

  • BKeep the automatic reservation but share it with a new batch project, and run the batch VMs in that project

    Incorrect

    Reserved resources are held for the owner project and the projects it is shared with, so matching VMs in the original project still consume them.

  • CKeep the automatic reservation and raise its VM count to 60, so that enough VMs remain after other workloads take theirs

    Incorrect

    Any matching VM still consumes an automatic reservation, so the extra capacity can be taken too, and the team pays for 20 more VMs.

  • DKeep the automatic reservation and create the batch VMs with --reservation-affinity=any at the start of each run

    Incorrect

    any is the default and consumes whichever matching reservation is free; it does not stop other workloads from consuming it first.

Automatically consumed reservations are used by any VM that matches their properties. A reservation created with --require-specific-reservation is consumed only by VMs that target it, with --reservation-affinity=specific and --reservation set to its name.

Question 7 · choose 1

A GKE Standard cluster runs batch workers whose Pods come and go all day. The cluster autoscaler keeps many half-empty nodes for long periods after load drops. The team accepts that new Pods may sometimes wait for nodes to be provisioned, and wants the autoscaler to remove underused nodes more aggressively. What should it change?

  1. ASet the location policy of the node pools to BALANCED, so that nodes are spread evenly across the zones
  2. BSwitch the cluster's autoscaling profile to optimize-utilization from the default balanced profile
  3. CRaise the node pool's minimum size, so that the autoscaler has a larger base from which to remove nodes
  4. DKeep the balanced profile and give the batch Pods their own custom scheduler name in the Pod spec
Show the answer and why
  • ASet the location policy of the node pools to BALANCED, so that nodes are spread evenly across the zones

    Incorrect

    The location policy controls how nodes are distributed across zones; it does not make the autoscaler remove underused nodes sooner.

  • BSwitch the cluster's autoscaling profile to optimize-utilization from the default balanced profile

    Correct

    optimize-utilization favors utilization over spare capacity: the autoscaler removes more nodes, faster, and GKE prefers to schedule Pods on nodes that are already highly allocated.

  • CRaise the node pool's minimum size, so that the autoscaler has a larger base from which to remove nodes

    Incorrect

    A higher minimum keeps more nodes running at all times, which is the opposite of removing underused nodes.

  • DKeep the balanced profile and give the batch Pods their own custom scheduler name in the Pod spec

    Incorrect

    The balanced profile keeps spare resources by design, and Pods with a custom scheduler are not packed by the utilization-focused scheduler.

GKE offers two cluster autoscaling profiles. balanced, the default for Standard clusters, keeps more resources ready for incoming Pods. optimize-utilization scales down more aggressively and sets the scheduler name to gke.io/optimize-utilization-scheduler so that Pods land on nodes that are already highly allocated; Pods with a custom scheduler are not affected.

Practice domain 3 →Practice all domains →