Google Prof. Cloud DevOps Labs

Hands-on PBQ labs for the Google Professional Cloud DevOps Engineer exam: configure Cloud Build CI/CD pipelines, deploy to GKE with Deployment Manager, and implement Cloud Monitoring alerting policies with SLO-based dashboards.

These labs cover all DevOps & container certifications including:

KCNADCAKCSATerraform AssociateCKAD
CKACKSAWS DevOps ProfessionalAzure DevOps AZ-400Google Prof. Cloud DevOps

Google Prof. Cloud DevOps Labs - Module 10

Professional GCP DevOps labs with Cloud Build pipelines, GKE deployments, and Cloud Monitoring alerting - aligned to the Google Professional Cloud DevOps Engineer exam.

Lab 28: Cloud Build CI/CD Pipeline
GCP / GUI + Terminal
Scenario: Automated Build + Deploy
Your team needs a Cloud Build pipeline that builds a Docker image from source, pushes it to Artifact Registry, runs unit tests, and deploys to Cloud Run. Configure build triggers on the main branch with substitution variables.
GCP DevOps Lab

Learning Objectives:

  • Cloud Build: cloudbuild.yaml, steps, triggers
  • Artifact Registry: Docker image push
  • Testing: unit test step in pipeline
  • Cloud Run: deploy from build pipeline

Step-by-Step Instructions

  1. Step 1: Configure build source
    In the Build Console, set:
    Repo = webapp-api Branch = main
    Then click Set Source.
  2. Step 2: Add Docker build step
    Set:
    Builder = gcr.io/cloud-builders/docker Registry = us-docker.pkg.dev
    Then click Add Build Step.
  3. Step 3: Add test step
    Set:
    Builder = gcr.io/cloud-builders/npm Args = test
    Then click Add Test Step.
  4. Step 4: Add deploy step
    Set:
    Target = Cloud Run Service = webapp-api Region = us-central1
    Then click Add Deploy Step.
  5. Step 5: Generate cloudbuild.yaml
    Click Generate YAML.
  6. Step 6: Trigger build
    In Terminal:
    gcloud builds submit --config=cloudbuild.yaml .
    Expected: build, test, and deploy steps succeed.

GCP DevOps Lab Environment

Build Console
Terminal
Cloud Build Pipeline BuilderProject: certlabs-prod
Source Configuration
Build Steps
Pipeline Status
Build Step--
Test Step--
Deploy Step--
YAMLNo
Configuration
Source--
Registry--
Target--
Region--
Activity Log
[system]Build console ready.
admin@gcp-devops:~$
Progress: 0/6
Score: 0/100
After Completing All Steps:

1. Validate to see pipeline checklist.
2. View Architecture for build flow.
3. Reset to re-practice.
0%

Lab Completed!

Lab 29: GKE Deployment + Rolling Updates
GCP / GUI + Terminal
Scenario: Zero-Downtime GKE Rollout
Deploy a containerized application to a GKE cluster using a Deployment with rolling update strategy. Configure health checks, resource limits, and a HorizontalPodAutoscaler. Perform a canary-style rollout and verify zero-downtime.
GCP DevOps Lab

Learning Objectives:

  • GKE: cluster, deployments, services
  • Rolling Updates: maxSurge, maxUnavailable
  • HPA: autoscaling based on CPU
  • Health Checks: liveness + readiness probes

Step-by-Step Instructions

  1. Step 1: Select cluster + image
    In the GKE Console, set:
    Cluster = prod-cluster Image = webapp-api:v1
    Then click Set Deployment.
  2. Step 2: Configure rolling update
    Set:
    MaxSurge = 25% MaxUnavailable = 0
    Then click Set Strategy.
  3. Step 3: Configure HPA
    Set:
    Min Replicas = 2 Max Replicas = 10 CPU Target = 70%
    Then click Create HPA.
  4. Step 4: Deploy to cluster
    Click Deploy.
  5. Step 5: Trigger rolling update
    In Terminal:
    kubectl set image deployment/webapp-api webapp-api=webapp-api:v2 --record
    Expected: pods updated with zero downtime.
  6. Step 6: Verify rollout
    kubectl rollout status deployment/webapp-api

GCP DevOps Lab Environment

GKE Console
Terminal
GKE Deployment ManagerCluster: prod-cluster
Deployment Config
Autoscaling (HPA)
Deployment Status
Cluster--
Image--
Strategy--
DeployedNo
Autoscaler
HPA--
Replicas--
CPU Target--
Rollout--
Activity Log
[system]GKE console ready.
admin@gcp-devops:~$
Progress: 0/6
Score: 0/100
After Completing All Steps:

1. Validate to see GKE deployment checklist.
2. View Architecture for rollout flow.
3. Reset to re-practice.
0%

Lab Completed!

Lab 30: Cloud Monitoring + Alerting Policies
GCP / GUI + Terminal
Scenario: SLO Monitoring + Incident Response
Configure Cloud Monitoring alerting policies for your Cloud Run service: create an uptime check, set a latency-based SLO, create an alerting policy on error rate, and verify incident creation when the SLO is breached. Configure notification channels for the ops team.
GCP DevOps Lab

Learning Objectives:

  • Cloud Monitoring: uptime checks, metrics
  • SLOs: latency-based service level objectives
  • Alerting: policies and notification channels
  • Incidents: automated incident creation

Step-by-Step Instructions

  1. Step 1: Create uptime check
    In the Monitoring Console, set:
    Service = webapp-api Protocol = HTTPS Interval = 60s
    Then click Create Uptime Check.
  2. Step 2: Create SLO
    Set:
    SLI = latency Threshold = 200ms Goal = 99.5%
    Then click Create SLO.
  3. Step 3: Create alerting policy
    Set:
    Metric = error_rate Threshold = 5% Channel = ops-team-email
    Then click Create Alert Policy.
  4. Step 4: Simulate SLO breach
    In Terminal:
    gcloud monitoring slo breach --service webapp-api --slo latency-slo
    Expected: incident created, alert fired.
  5. Step 5: Resolve incident
    gcloud monitoring incidents resolve --incident-id INC-001
  6. Step 6: Verify SLO status
    gcloud monitoring slo describe --service webapp-api --slo latency-slo
    Expected: SLO status = Compliant, error budget remaining.

GCP DevOps Lab Environment

Monitoring Console
Terminal
Cloud Monitoring + SLOsProject: certlabs-prod
Uptime Check
SLO + Alerting
Monitoring Status
Uptime Check--
SLO--
Alert Policy--
Channel--
Incident Status
SLO Status--
Incident--
Error Budget--
Resolved--
Activity Log
[system]Monitoring console ready.
admin@gcp-devops:~$
Progress: 0/6
Score: 0/100
After Completing All Steps:

1. Validate to see monitoring checklist.
2. View Architecture for SLO flow.
3. Reset to re-practice.
0%

Lab Completed!