Prepare and test your skills
Prepare and test your skills
Secure and orderly service retirement is the controlled end of a cloud service lifecycle that preserves data, avoids abrupt outages, and removes residual resources. A managed service (opens in a new tab) is the logical resource integrated with Service Infrastructure, with only two immutable properties — service name and producer project — plus a set of service consumers, a history of immutable service configurations, and a history of immutable service rollouts. The configurations referenced by the latest rollout represent the current state of the service, from display name to metrics definitions to rate limits, so retirement means driving that declarative state to a safe shutdown and then decommissioning the underlying infrastructure.
The managed service lifecycle defines how a service moves from creation through active operation to deletion and possible recovery. A managed service implementation can provide wide functionality, such as the Cloud Storage API providing planet-scale object storage, but its lifecycle is managed with gcloud endpoints services commands or the Service Management API for programmatic control. The declarative model requires pushing immutable service configurations and service rollouts to reach the desired state, which means retirement is not a single delete but a sequence of configuration, rollout, and resource cleanup steps.
Lifecycle operations for inventory and removal include:
gcloud endpoints services list to inventory what exists before retirement.gcloud endpoints services describe to confirm consumers, limits, and dependencies.gcloud endpoints services delete when it is no longer needed, which starts a mandatory retention window.gcloud endpoints services undelete within its retention window if retirement must be reversed.Retirement planning with isolation and ownership prevents a shutdown from creating security gaps or orphaned billing dependencies. A dedicated producer project provides the best security and isolation for a service and allows ownership of the service to be transferred to another team or even another company, which matters when a service is deprecated but not yet fully removed. Integration with Service Infrastructure depends on several paid Google Cloud products, including the Service Control API, Cloud Logging API, and Cloud Monitoring API, so the plan must account for disabling or transferring those dependencies.
The producer project must have the Service Management API and Service Control API enabled and Cloud Billing enabled to support those dependencies during the transition. Because global resources such as Virtual Private Cloud networks and global load balancers are resilient to zone and region outages, teams often use single instances of them, which makes those global resources potential single points of failure during retirement. The change-review process should therefore classify any modification to global resources as a high-risk change that additional reviewers must verify and approve, so a forwarding-rule misconfiguration does not stop the frontend from receiving user requests while the backend is still intact.
Data preservation ensures that business and compliance needs survive after the service stops serving traffic. Retirement must define an exit plan for services with unique characteristics, including strategies for data retrieval and operational continuity, and verify that chosen services support exporting data to an open format like CSV, Parquet, and Avro. For container-based workloads, open-technology support such as Google Kubernetes Engine support for the Open Container Initiative format or Managed Service for Apache Airflow built on Apache Airflow reduces lock-in during migration or shutdown.
Practical preservation options supported by Google Cloud include:
A controlled shutdown reduces reliability risk by changing production infrastructure progressively and monitoring availability throughout the retirement window. When infrastructure must change, the change should first be deployed to a few virtual machines in one zone, and the effects should be monitored before wider rollout. If any issue is observed, the infrastructure is reverted quickly to the previous stable state, the issue is diagnosed and resolved, and the progressive process restarts; only after the workload runs as expected are changes gradually deployed across all infrastructure.
A progressive wind-down follows an ordered sequence:
Availability during this sequence is monitored through the Google Cloud Service Health Dashboard, which shows current service status across regions, and the incident history, which provides duration, affected zones and regions, affected services, and workarounds. Personalized Service Health shows incidents relevant to a specific project, supports per-project or per-organization API access, configures alerts, and provides RSS feeds, so the retirement team can distinguish a Google Cloud infrastructure incident from an application or configuration error caused by the shutdown itself.
Exam tip: Every deleted managed service has a mandatory 30-day deletion retention, and undelete works only within that retention window.
Systematic decommissioning removes residual resources so a retired service leaves no orphaned jobs, identities, or billable infrastructure. Deleting selected resources inside a project is preferred when only part of the environment retires, while deleting the whole project is used when the entire service boundary is gone. Reusing projects can help avoid exceeding project quota limits when exploring multiple architectures, but a project that is fully retired should be shut down through the Manage resources page to stop all contained resources together.
Decommissioning a full project follows an ordered workflow where the project boundary controls all contained resources:
A deleted managed service remains recoverable during its 30-day retention through gcloud endpoints services undelete, which provides a safety net if consumers still depend on the service name or if decommissioning reveals a missed dependency. After the retention window and project shutdown complete, the service name, producer project binding, configurations, and rollouts are gone, so verification of exports, snapshots, and consumer migration must finish before that window closes.
Proactive maintenance is the practice of keeping cloud services reliable through automated patching, planned capacity, safe upgrades, and continuous learning from failures. In Site Reliability Engineering terms, every code release or environment change can cause downtime, so change must be balanced against availability, latency, performance, and capacity. On Google Cloud, this balance is achieved when Google maintains the underlying platform while customers automate deployments, validate scaling, and close the loop with incident review.
The shared responsibility model defines which maintenance tasks Google performs and which tasks the customer owns for Google Kubernetes Engine (GKE) (opens in a new tab). Google protects the underlying infrastructure, including hardware, firmware, kernel, operating system, storage, and network, and hardens and patches the GKE control plane and node components. The control plane includes the API server, scheduler, controller manager, cluster certificate authority, etcd, and IAM authenticator, and all control plane components run on Google-operated, single-tenant Compute Engine instances. Google also hardens and patches node components such as the kubelet configuration, metadata server for Workload Identity, Container Network Interface plugin, persistent volume CSI driver, and logging and monitoring agents.
Customers own their workloads and operational hygiene on top of that platform. Customer duties include application code, build files, container images, data, role-based access control and IAM policy, and the containers and pods they run. Customers must also rotate cluster credentials, monitor clusters and applications and respond to alerts, keep logging and monitoring enabled, and provide environmental details when Google requests them for troubleshooting. If logging and monitoring are disabled and support personnel cannot access those logs, support is available on a best-effort basis only.
Google promptly makes patches for node operating system images such as Container-Optimized OS and Ubuntu available, and those updates deploy automatically when auto-upgrade is enabled or when the cluster uses a release channel. This operating system layer underneath the container is not the same as the operating system running inside customer containers, which remains the customer responsibility. Customers running GKE Standard must keep node pools enrolled in automatic upgrades and must manually upgrade clusters and node pools to meet patch timelines in two cases: when auto-upgrades are postponed by factors like maintenance policies, and when a patch is needed before it becomes available in the selected release channel.
GKE upgrades preserve availability by combining automated patch delivery with redundancy, gradual rollout, and health-aware traffic routing. A regional cluster distributes GKE control plane components, nodes, and pods across multiple zones within a region, so the cluster control plane remains reachable during an outage that affects one or more but not all zones. Similarly, Compute Engine managed instance groups distribute virtual machine instances across multiple zones in a region and manage them as a logical unit, while regional persistent disks replicate data to two zones. Choosing an appropriate deployment strategy further reduces risk by gradually increasing exposure of new versions to larger audiences, verifying behavior along the way, and setting clear provisions for rollback if problems occur.
Load balancing and health checking ensure traffic flows only to backends that can serve it during maintenance. Most load balancers provide health-checking features so traffic is not routed to unhealthy or unavailable resources, and internal layer 4 and layer 7 load balancing extends that protection to traffic between tiers inside the application. Even when infrastructure resources exist in the RUNNING state, application software on some virtual machines may have crashed, so load-balancing health checks prevent those failed backends from receiving requests. Together, redundant placement across zones, automated operating system and Kubernetes version delivery, gradual exposure with rollback, and health-checked load balancing allow node upgrades and maintenance to proceed without shifting all risk to a single zone or version.
Exam tip: Google patches the node operating system underneath the container, not the operating system inside customer containers; keep Standard node pools enrolled in automatic upgrades and manually upgrade only when maintenance policies postpone auto-upgrades or when you need a patch from a newer release channel.
Capacity management is the continuous protocol of forecasting load, provisioning with redundancy, and adjusting resources as utilization changes. Proactive capacity work prevents both outages from under-provisioning and waste from idle redundancy, and it depends on monitoring utilization and reassessing requirements as behavior, objectives, and budgets evolve.
A complete capacity plan addresses each of the following elements:
Autoscaling maintains availability without the operational overhead of manually adding and removing redundant resources. When load increases, autoscaling provisions additional resources automatically to preserve performance; when load falls, it removes unused resources to reduce cost. Google Cloud services implement this pattern in different forms:
Validation confirms that maintenance, redundancy, and autoscaling behave as designed before a real failure or traffic spike occurs. As applications evolve, user behavior, traffic profiles, business priorities, and dependencies change, so resilience and scalability must be periodically retested rather than assumed from the original design. The overarching theme is that the best way to avoid failure is to introduce failure and learn from it, while also verifying that expected alerts and metrics are generated.
Resilience testing follows an escalating sequence that validates and documents behavior at each stage:
When a service mesh such as Istio manages application services, faults can be injected at the application layer instead of killing pods or machines, or corrupting packets can be injected at the TCP layer. Delays simulate network latency or an overloaded upstream system, while aborts mimic failures in upstream systems. Scaling validation uses automated nonfunctional and load testing, for example sending load with tools like hey or running distributed load tests from GKE against a REST endpoint. Tests should confirm that key metrics such as average request latency or task-processing time stay within expected levels, that the number of created resources stays within the expected range, and that edge cases are understood, including behavior at maximum scaling limits and behavior when load suddenly increases while the service is scaling down.
Blameless postmortems are the Site Reliability Engineering practice of examining the causes of and responses to an incident without blame in order to prevent similar events in the future. For distributed applications operating at scale, some degree of failure from defective releases, terminated virtual machines, or zonal infrastructure outages is common, and even careful design leaves unexpected events that require human intervention. Structured incident management reduces impact and resolution time, while postmortem review converts operational experience into fixes for code, configuration, automation, and runbooks. Templates from the SRE books can help shape minimum viable incident and postmortem processes when full Google SRE practices are not practical.
This learning loop directly mitigates technical debt by refining architecture over time. Automated testing supports the loop through fast feedback on each commit, with unit tests providing the bulk of coverage because they are quick and maintainable, and with integration and system tests simplified by infrastructure-as-code environments that can be created on demand and torn down after tests. Continuous integration with tools like Cloud Build executes those tests on every change, and deployment automation then carries stable software forward with gradual exposure and rollback. Because software systems are living things, teams must always be architecting by looking for ways to refine, simplify, and improve as products, patterns, and stakeholder demands change.
Design and execute progressive deployment and launch strategies means changing production infrastructure in small, monitored stages instead of all at once. A change is first applied to a limited failure domain, such as a few virtual machines in one zone, verified against expected behavior, and only then expanded across zones, regions, and the full fleet. This approach limits the blast radius of a bad change and preserves the ability to revert quickly to the previous stable state.
The progressive rollout workflow is the ordered process for safely introducing an infrastructure change, such as a new virtual machine machine type or a new Cloud Storage bucket storage class. The workflow depends on monitoring between stages, so each expansion is gated by evidence that the workload still runs as expected. Reverting early prevents a localized issue from becoming a service-wide outage.
The workflow proceeds in order:
This sequence applies throughout planning, deployment, and maintenance because capacity, configuration, and platform behavior change over time. Benchmarking under normal and peak load, managing quotas, and reserving Compute Engine capacity help ensure that each stage has enough headroom to reveal real performance effects.
Availability targets shape launch scope because wider distribution across failure domains provides higher expected uptime. A region is an independent geographic area that consists of zones, and zones and regions are logical abstractions of physical resources that can fail independently. Distributing redundantly across those failure domains lets an application achieve higher aggregate availability than any single domain provides.
| Deployment location | Availability target | Estimated maximum downtime in a 30-day month |
|---|---|---|
| Single zone | 99.9% | 43.2 minutes |
| Multiple zones in a region | 99.99% | 4.3 minutes |
| Multiple regions | 99.999% | 26 seconds |
These percentages are design targets, not guarantees, since the uptime service level agreements for specific services can differ. A launch plan should therefore select dependencies whose designed-for targets exceed the application's intended reliability, so that application downtime plus platform downtime still meets the service objective. Increasing nines generally increases operational complexity, latency considerations, and cost, which is a core tradeoff in service lifecycle planning.
Controls for changes to global resources are stricter safeguards applied to resources that operate across all locations. Virtual Private Cloud (VPC) networks, including routes and firewall rules, and global external Application Load Balancers are examples of global resources that are resilient to zonal and regional outages. Because teams may use only a single instance of such a resource, that resource can become a single point of failure for the entire service.
A misconfigured forwarding rule on a global load balancer can stop the frontend from receiving or processing user requests, making the application unavailable to users even while the backend remains intact. To avoid that outcome, the change-review process should classify any modification to global resources as a high-risk change that additional reviewers must verify and approve before deployment to production. This control is especially important during launches, when network, DNS, and load-balancing changes are common and errors propagate globally.
Exam tip: Treat a change to a global resource, such as a VPC network or global load balancer forwarding rule, as high-risk requiring extra reviewer approval, while a zonal infrastructure change can roll out progressively from a few virtual machines in one zone.
Monitoring rollouts means using platform health signals plus workload signals to decide whether to proceed, pause, or roll back. The Google Cloud Service Health Dashboard (opens in a new tab) shows the current status of Google Cloud services across all regions, while the history page details each past incident by duration, affected zones and regions, affected services, and recommended workarounds. Personalized Service Health filters incidents to those relevant to a project, supports requesting incident information through an API on a per-project or per-organization basis, supports configured alerts, and supports programmatic status updates through an RSS feed.
Workload monitoring remains essential because unavailability can occur with no platform incident. A software update can crash application servers, or an administrator can inadvertently delete load balancer forwarding rules during a launch. A robust launch plan therefore pairs progressive expansion with explicit checks for customer impact, detection method, application and data behavior during the event, cross-dependencies on other applications, recovery ownership, and notification responsibilities.
A deleted managed service remains recoverable with undelete only during its mandatory 30-day retention window. After that window and project shutdown complete, the service name, producer project binding, configurations and rollouts are gone, so verification of exports, snapshots and consumer migration must finish before then.
Google hardens and patches the node operating system underneath the container, including Container-Optimized OS and Ubuntu, with updates deploying automatically when auto-upgrade is enabled or the cluster uses a release channel. Customers remain responsible for the operating system inside their containers and for keeping Google Kubernetes Engine Standard node pools enrolled in automatic upgrades, manually upgrading only when maintenance policies postpone auto-upgrades or when a patch from a newer release channel is needed.
Apply the change to a few virtual machines in one zone and monitor workload behavior and user impact before wider rollout. If issues appear, revert quickly to the previous stable state, diagnose and resolve the cause, then restart the process and expand gradually across remaining zones, regions and global resources only after verification.
A single zone targets 99.9 percent availability with about 43.2 minutes of maximum downtime in a 30-day month, multiple zones in a region target 99.99 percent with about 4.3 minutes, and multiple regions target 99.999 percent with about 26 seconds. These percentages are design targets not guarantees, since the uptime service level agreements for specific services can differ.
Your team is preparing a deployment strategy for a mission-critical checkout microservice hosted on Cloud Run. To adhere to Site Reliability Engineering (SRE) principles and minimize customer impact, your deployment plan must satisfy the following criteria:
Which deployment and release strategy should you implement?
Update the existing Cloud Run revision in-place by overwriting its container image and using Cloud Build scripts to rebuild the prior source code if Cloud Logging generates error notifications.
Deploy the application across all GKE fleet clusters simultaneously using Config Sync and Fleet Packages with a rolling rollout strategy set to maxConcurrent: 1.
Use Google Cloud Deploy to deliver the new container as a Cloud Run revision using a phased canary rollout strategy with deployment verification, and abandon the release to revert traffic back to the stable revision if SLO burn rate alerts fire.
Execute an immediate blue-green swap by creating an isolated Cloud Run service for testing, running synthetic benchmarks, and switching 100% of live DNS traffic to the new service while terminating the old service.
Last updated