Prepare and test your skills
Prepare and test your skills
Automated CI/CD Pipeline Implementation is the consistent, repeatable deployment of application stacks and service access points across Virtual Private Clouds (VPCs), regions, and clouds. The practice establishes automated workflows that move application code from development to production, with regional application stacks providing the resilient destination where releases land. Each regional stack repeats the same layers, load balancing, and Domain Name System (DNS) pattern so automated releases behave the same way in every region.
Service access VPCs and application VPCs are two VPC roles that control how broadly shared services can be reached. A service access VPC is a VPC that hosts shared consumer access points and provides transitive connectivity to other VPCs and external networks. An application VPC is a VPC that hosts dedicated consumer access points that can be reached only from resources inside that same application VPC. A VPC that hosts both application resources and shared consumer access points must be configured and handled as a service access VPC because transitive connectivity changes its firewall and routing responsibilities.
| Access mode | Deployment location | Reachability |
|---|---|---|
| Shared consumer access points | Service access VPC | Accessible from any other VPC or external network |
| Dedicated consumer access points | Application VPC | Accessible only from resources within that application VPC |
Exam tip: Shared access points live in a service access VPC and are reachable broadly, while dedicated access points live in an application VPC and are reachable only inside that VPC.
Shared managed services access is the deployment of service consumer access points in a services VPC for use by many networks. Traffic flows from application VPCs and external networks to the forwarding rules and access points in the services VPC, so the services VPC depends on correct route advertisements and multicloud firewall rules to stay reachable. For all service consumption methods, including Private Service Connect (opens in a new tab), complete these tasks:
For private service access, shared deployment adds dependencies between producer and consumer networks. The deployment must export custom routes to the service producer's network, create ingress firewall rules that allow the private services access subnet into the application VPCs, and create ingress firewall rules that allow the private services access subnet into the services VPC. For serverless access, the VPC Access connector requires a dedicated /28 regular subnet, Cloud Router advertises regular subnets by default, and firewall access must be opened for the connector subnet within the VPCs, in multicloud firewalls, and for the private services access subnet into the application VPCs.
Dedicated managed services access is the deployment of a separate service access point in each application VPC where access is needed. Traffic flows only from resources inside the application VPC to the forwarding rule in that same VPC, so no transitive connectivity crosses the VPC boundary. To implement dedicated access, deploy a forwarding rule for the service in each application VPC to create an access point, and for private service access create ingress firewall rules that allow the private services access subnet into the application VPCs.
For serverless service access, dedicated deployment keeps the connector local to the consuming VPC. The VPC Access connector requires a dedicated /28 regular subnet in the application VPC, and ingress firewall rules must allow the VPC Access connector subnet within the application VPCs. This pattern isolates each application VPC, but it requires repeating the forwarding rule and firewall configuration in every VPC that needs the service.
A regional application stack is a concatenation of regional application service layers that all operate in the same region. An example stack is a regional web service layer that talks to an application layer in the same region that in turn talks to a database layer in the same region. Each regional application service layer uses load balancers to distribute traffic across the endpoints of that layer in the region, and reliability is achieved by distributing backend resources across three or more zones in the region. Application service layer uniform resource locators (URLs) resolve to the specific load balancer frontend regional IP address through DNS mappings registered in the relevant DNS zone for each application service.
Regional stacks extend consistently across Google Cloud, other cloud providers, and on-premises data centers by deploying equivalent service layers in equivalent regions and publishing services in the region of the stack. A complete instance of the application stack is deployed in each region, which enables active-standby resiliency where the stack in another region takes over delivery of the entire application when out-of-band monitoring reports a failure in any service layer. When a failure is reported for one service layer, the frontend of the application is re-anchored to the backup stack, so automated deployment must keep the regional stacks identical to allow full failover.
Infrastructure as Code (IaC) and resource provisioning is the practice of defining cloud resources in declarative files and deploying them with automation for consistent results. The approach uses tools such as Terraform or Deployment Manager to automate provisioning and keep development, staging, and production tiers consistent. In Google Cloud, a framework deployment (opens in a new tab) applies a versioned compliance framework and its cloud controls to a target organization, folder, or project. The deployment is driven by the gcloud compliance-manager framework-deployments create command, a stored metadata file, and explicit target flags, so the same definition can be reused across environments.
Declarative cloud control metadata is a separate YAML or JavaScript Object Notation (JSON) file that lists which cloud controls belong in a framework deployment and how each control should enforce. The file separates the desired state from the deployment command, so the same control set can be reviewed, versioned, and redeployed without retyping parameters. Each entry names a specific control revision and its enforcement behavior, and the deployment applies that state to the chosen target. Because the framework deployment depends on this file plus the framework name and framework major revision identifier (ID), changing the file and redeploying changes what is enforced without changing the deployment workflow.
The metadata file uses the following peer fields for each control:
name: the full resource name of the cloud control, in the format organizations/ORGANIZATION_ID/locations/LOCATION/cloudControls/CLOUD_CONTROL_NAMEmajorRevisionId: the major version of the cloud control, such as 1 for restrict-bucket-region or 2 for enable-binary-authorizationparameters: the optional settings certain controls require, such as a location parameter with a stringValue of us-westenforcementMode: whether the control is an AUDIT, DETECTIVE, or PREVENTIVE controlPass the file to the command with --cloud-control-metadata=path_to_file.(yaml|json). The command then applies the listed controls and enforcement modes to the selected organization, folder, or project.
The framework deployment command creates a deployment object in an organization and location and links it to an existing framework version and target resources. The deployment lives in ORGANIZATION and LOCATION, where location is the region that stores the framework deployment, and it references a framework in the format organizations/ORGANIZATION_ID/locations/LOCATION/frameworks/FRAMEWORK_NAME with a FRAMEWORK_MAJOR_REVISION_ID. Enforcement flows from the framework deployment to the target organization, folder, or project selected by the target flags. Use resource identifiers only instead of fully qualified resource names when possible to keep the Infrastructure as Code definition portable.
Choose the target flags by the provisioning goal for the deployment:
| Deployment goal | Flag group to use |
|---|---|
| Deploy to an existing organization, folder, or project | --target-resource-config-existing |
| Create a new folder while deploying the framework | --target-resource-creation-config-folder-display-name with --target-resource-creation-config-folder-parent |
| Create a new project while deploying the framework | --target-resource-creation-config-project-display-name with --target-resource-creation-config-project-parent and --target-resource-creation-config-project-billing-account-id |
Exam tip: Use --target-resource-config-existing for an existing organization, folder, or project, and use the target-resource-creation-config flag groups only when creating a new folder or project during framework deployment.
Deployment strategies and traffic management control how new application versions reach users without interrupting service. Cloud Deploy automates progressive rollouts through delivery pipelines, while load balancers split traffic across healthy resources and multiple environments validate changes before production. Together, these mechanisms maintain high availability and let teams detect performance problems during updates.
Cloud Deploy (opens in a new tab) is the continuous delivery service that deploys workloads to runtimes such as Google Kubernetes Engine (GKE) and Cloud Run using delivery pipelines, releases, and rollouts. A delivery pipeline holds the canary configuration for a target, a release represents the new container image to deploy, and a rollout moves that release through ordered phases such as a canary-50 phase followed by a stable phase. Traffic flows first to the small canary population and only after approval flows to the remaining stable population, so performance can be validated on live traffic with limited blast radius. Cloud Deploy skips the canary phase and runs only the stable phase when the application has not been deployed to that runtime yet, because there is no prior stable version to compare against or to preserve for fallback.
A canary rollout follows an ordered workflow:
us-central1, which starts the initial canary phase of the rollout.gcloud deploy rollouts advance command or by selecting Advance rollout on the rollout details page in the Google Cloud console.Exam tip: Cloud Deploy skips canary phases on the very first deployment to a runtime and runs only the stable phase.
Load balancing (opens in a new tab) in Google Cloud is the traffic management layer that distributes client traffic among groups of resources across zones. Traffic flows from the load balancer to backend instance groups, GKE pods, or managed service endpoints, and the load balancer depends on health checks to decide where traffic can go. When a health check marks an instance or pod as unhealthy or unavailable, the load balancer stops routing traffic to that resource and sends traffic only to healthy resources in available zones. This behavior directly supports updates because new and old versions can serve side by side while unhealthy versions are removed from rotation.
Services such as App Engine and Cloud Run automatically load-balance traffic, while Compute Engine and GKE workloads require selection of an appropriate Google Cloud load balancer based on traffic type and source. Using load balancing at each application tier prevents individual resources from becoming overloaded while others sit idle and keeps service usable during rolling changes. Health checks therefore form the dependency between deployment safety and traffic management: the load balancer can protect availability only when health checks accurately report which backends can serve.
Multiple environments separate production traffic from validation work so software and infrastructure updates are tested before they reach users. Production serves live traffic for mission-critical applications, while earlier environments run performance benchmarks, quality assurance, and control-plane and node upgrade tests. The canary environment acts as a secondary development environment for testing newer Kubernetes releases, mesh features, and application programming interfaces (APIs) before those releases are promoted to a production-ready state.
The documented environment set includes:
Managed Cloud Service Mesh (opens in a new tab) and GKE release channels control upgrade cadence across these environments. Production uses the stable or regular channel for stability and version maturity, staging uses the same channel as production so tests reflect the upcoming production version, and the canary environment uses the rapid channel to test the latest releases against specific configurations. After enrollment, the control plane is upgraded first followed by the data plane, with patches gaining soak time in rapid and regular channels before reaching stable.
High availability design keeps service usable during updates by redundantly deploying components across locations and favoring managed services with built-in redundancy. Availability measures the fraction of time a service is usable, and redundancy duplicates system components so loss of one zone or region does not remove all capacity. Immutable infrastructure further improves consistency by replacing resources rather than modifying them in place, which makes deployments and rollbacks more predictable and reduces configuration drift and snowflake servers.
Google Cloud organizes locations into regions and zones, and deployment choices trade resilience against latency and cost:
| Model | Coverage | Behavior on failure |
|---|---|---|
| Regional | Infrastructure runs in one region and is managed to be redundantly available across all zones in that region | If a zone becomes unavailable, the app or data automatically serves from another zone in the same region |
| Multi-regional | Infrastructure runs in several regions with data replicated across regions | The service withstands loss of an entire region, typically at the cost of higher latency |
Compute Engine managed instance groups (MIGs) distribute virtual machine instances across multiple zones in a region and manage them as a logical unit, while regional persistent disks synchronously replicate block data to two zones in a region. A GKE regional cluster distributes control-plane components, nodes, and pods across multiple zones within a region, so the cluster control plane remains accessible during an outage affecting one or more but not all zones. For stateful tiers, managed databases such as Cloud SQL provide an availability service level agreement (SLA) and handle replication, backups, and underlying infrastructure on behalf of the application.
A service access Virtual Private Cloud (VPC) hosts shared consumer access points that are accessible from any other VPC or external network, while an application Virtual Private Cloud (VPC) hosts dedicated consumer access points that are accessible only from resources inside that same application VPC. A VPC that hosts both application resources and shared consumer access points must be configured and handled as a service access VPC because transitive connectivity changes its firewall and routing responsibilities.
Use dedicated managed services access when traffic must flow only from resources inside the application Virtual Private Cloud (VPC) to the forwarding rule in that same VPC without transitive connectivity crossing the VPC boundary. Shared managed services access deploys service consumer access points in a services VPC with transitive reachability to other VPCs and therefore depends on correct route advertisements and multicloud firewall rules to stay reachable.
A Cloud Deploy delivery pipeline holds the canary configuration for a target, a release represents the new container image to deploy, and a rollout moves that release through ordered phases such as a canary-50 phase followed by a stable phase. Traffic flows first to the small canary population and only after approval flows to the remaining stable population, and Cloud Deploy skips the canary phase and runs only the stable phase when the application has not been deployed to that runtime yet.
A regional application stack is a concatenation of regional application service layers that all operate in the same region, with each layer using load balancers to distribute traffic and reliability achieved by distributing backend resources across three or more zones. A complete instance of the stack is deployed in each region with the same layers, load balancing, and Domain Name System (DNS) pattern, so when out-of-band monitoring reports a failure in any service layer the frontend can be re-anchored to the backup stack in another region.
An enterprise organization runs a critical e-commerce service behind an external Application Load Balancer on Google Cloud. The development team needs to deploy a major update using a canary deployment strategy.
The deployment strategy must satisfy the following operational requirements:
service-v2) to evaluate performance and error rates under real traffic.service-v1).service-v2 or instantly revert to 100% on service-v1 without deploying new infrastructure.Which traffic management configuration should you recommend?
Place both application versions inside the same backend service and adjust the maximum utilization capacity settings of the canary instance group to 5%.
Configure a Pod Disruption Budget (PDB) on the cluster with minAvailable: 95% to prevent the canary version from receiving more than 5% of total requests.
Configure Cloud DNS weighted routing policies to distribute traffic across two distinct external forwarding rule IP addresses pointing to service-v1 and service-v2.
Configure route rules in the load balancer's URL map path matcher that utilize routeAction.weightedBackendServices to assign weight 95 to service-v1 and weight 5 to service-v2.
Last updated