🚀 Deploying Applications - PCD Practice Questions

Deploy to GKE, Cloud Run, App Engine with strategies like canary, blue-green, and rolling updates.

20Questions Available
1Exam Domains

Practice Deploying Questions Now

Start a timed practice session focusing on Deploying Applications topics from the PCD question bank.

Start PCD Practice Quiz →

PCD Deploying Question Bank (20 Questions)

Browse all 20 practice questions covering Deploying Applications for the PCD certification exam. Each question includes the full answer and a detailed explanation to help you understand the concepts.

  1. Question 1Deploying Applications

    How do you implement a canary deployment for a GKE service?

    ADeploy to half the pods
    BUse Istio/Anthos Service Mesh VirtualService to route a percentage of traffic to the canary Deployment, monitor error rate and latency, and gradually increase traffic if healthy
    CDeploy to a separate cluster
    DUse feature flags instead
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    GKE canary with Istio: two Deployments (stable + canary). VirtualService routes traffic by weight (95/5 → 90/10 → 50/50 → 0/100). Monitor: Cloud Monitoring custom dashboards per version. Automated: Flagger observes metrics, promotes automatically. Cloud Deploy also supports canary for Cloud Run and GKE with built-in metrics analysis.

  2. Question 2Deploying Applications

    How do you implement a blue-green deployment on Cloud Run?

    ADeploy new version and delete old
    BDeploy the new revision (green) with --no-traffic flag, test it using a tagged URL, then instantly switch 100% traffic from blue to green using traffic routing
    CUse separate services
    DDeploy during downtime window
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Blue-green on Cloud Run: 1) Deploy green: gcloud run deploy --no-traffic (creates revision with 0% traffic). 2) Test green: gcloud run services update-traffic --to-tags=green=green-revision (tagged URL for testing). 3) Switch: gcloud run services update-traffic --to-revisions=green-revision=100. 4) Rollback: switch traffic back to blue revision instantly.

  3. Question 3Deploying Applications

    How do you deploy a new version with zero downtime in GKE?

    ADelete pods and recreate
    BUse Deployment rolling update strategy with readiness probes, liveness probes, and PodDisruptionBudgets — Kubernetes gradually replaces old pods with new ones
    CScale to zero first
    DManually update each pod
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Zero-downtime GKE: Deployment strategy: RollingUpdate (maxSurge: 1, maxUnavailable: 0 — always have capacity). Readiness probe: new pod only receives traffic when ready. Liveness probe: restart unhealthy pods. PDB: minAvailable ensures minimum pods during updates. PreStop hook: graceful shutdown (finish in-flight requests).

  4. Question 4Deploying Applications

    How do you implement blue-green deployments on Cloud Run?

    ANot possible
    BDeploy new revision, use traffic splitting to route 0% to new revision initially, test with tags (--tag=green), then shift 100% traffic when validated, with instant rollback to previous revision
    CManual DNS switching
    DLoad balancer only
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Cloud Run blue-green: deploy new revision (auto: no-traffic if --no-traffic flag). Tag: gcloud run services update-traffic --to-tags=green=100. Test: https://green---service-xxx.run.app. Promote: gcloud run services update-traffic --to-latest. Rollback: route traffic to previous revision. Instant: no downtime, no DNS propagation. Also: gradual rollout (10% → 50% → 100%).

  5. Question 5Deploying Applications

    What is a canary deployment on GKE?

    AA bird-related deployment
    BA deployment strategy where a small percentage of traffic is routed to the new version while the majority stays on the old version, allowing gradual validation
    CA full replacement
    DA blue-green deployment
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Canary on GKE: deploy new version with fewer replicas. Use: Istio traffic splitting (VirtualService weight), Gateway API HTTPRoute, or Cloud Deploy canary strategy. Validate: error rates, latency, business metrics. Gradually increase traffic percentage. Rollback if issues detected.

  6. Question 6Deploying Applications

    You want to gradually roll out a new version of a Cloud Run service. How do you do this?

    ADelete the old version and deploy new
    BDeploy the new revision, then use traffic splitting to route a percentage of traffic to the new revision — gradually increasing from 5% to 100% while monitoring errors
    CDeploy to a new service
    DUse DNS changes
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Cloud Run traffic splitting: gcloud run services update-traffic SERVICE --to-revisions=NEW=5,OLD=95. Monitor: error rate, latency. If healthy, increase: 25%, 50%, 100%. Rollback: route 100% back to old revision. Also: tags for preview URLs (test specific revisions with tagged URLs before routing traffic). Zero-downtime, gradual rollout.

  7. Question 7Designing Scalable, Available, and Reliable Cloud-Native Applications

    You need to deploy a stateful application (e.g., a database) on GKE. What Kubernetes resource should you use?

    ADeployment
    BStatefulSet — provides stable network identities, ordered deployment/scaling, and persistent volume claims per pod for stateful workloads
    CDaemonSet
    DJob
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    StatefulSet: stable pod names (pod-0, pod-1), ordered creation/deletion, persistent volume claims per pod (data survives pod restart). Use for: databases, Kafka, ZooKeeper, Elasticsearch. vs Deployment: stateless, random pod names, shared storage. StatefulSet + Persistent Disk = durable stateful workload on GKE.

  8. Question 8Building and Testing Applications

    How should you manage dependencies for a Python application deployed to Cloud Run?

    AInstall packages in the Dockerfile without pinning versions
    BPin exact versions in requirements.txt (pip freeze), use a lock file, copy requirements first in Dockerfile for layer caching, and scan for vulnerabilities
    CCopy the local virtual environment into the container
    DDownload packages at runtime
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Dependency management: Pin versions (package==1.2.3 in requirements.txt) for reproducible builds. Dockerfile: COPY requirements.txt . → RUN pip install (cached layer) → COPY . . (code changes don't rebuild deps). Vulnerability scanning: Artifact Registry on-push scanning. Use pip-audit or safety for proactive scanning in CI.

  9. Question 9Designing Scalable, Available, and Reliable Cloud-Native Applications

    How should you version a REST API deployed on Cloud Run?

    ANo versioning needed
    BURL path versioning (/v1/resources, /v2/resources) with Cloud Run traffic tags for testing new versions — maintain backward compatibility and deprecation timeline for old versions
    CCreate a new service for each version
    DUse query parameters for versioning
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    API versioning: URL path (/v1/, /v2/) is most common and explicit. Cloud Run: deploy new revision with v2 endpoints, use traffic tags to test (my-service-v2-xxx.run.app). Migrate traffic gradually. Backward compatibility: v1 continues working. Deprecation: communicate timeline, return deprecation headers, eventually sunset. Apigee for advanced versioning at scale.

  10. Question 10Deploying Applications

    A newly deployed Cloud Run revision is causing 500 errors. How do you quickly rollback?

    ADebug the issue in production
    Bgcloud run services update-traffic SERVICE --to-revisions=PREVIOUS_REVISION=100 — instantly routes all traffic back to the last known good revision
    CRedeploy the old code
    DDelete the service and recreate
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Cloud Run instant rollback: gcloud run services update-traffic SERVICE --to-revisions=GOOD_REVISION=100. Takes effect immediately (seconds). Previous revisions are retained. Also: gcloud run services update-traffic --to-latest (routes to latest stable). GKE: kubectl rollout undo deployment/NAME. Always verify rollback worked: check error rate, latency metrics.

  11. Question 11Building and Testing Applications

    What are Cloud Native Buildpacks and how do they simplify Cloud Run deployment?

    AA type of VM image
    BBuildpacks automatically detect your application's language and create an optimized container image without requiring a Dockerfile — gcloud run deploy uses buildpacks by default
    CA monitoring tool
    DA testing framework
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Google Cloud Buildpacks: detect language (Python, Java, Go, Node.js, .NET, Ruby), install dependencies, compile if needed, create optimized OCI container image. gcloud run deploy --source=. (no Dockerfile needed). Benefits: best practices built-in (security patches, layer optimization), consistent builds, no Dockerfile maintenance. Customizable with project.toml.

  12. Question 12Designing Scalable, Available, and Reliable Cloud-Native Applications

    How do you design a Cloud Run service for multi-region deployment with automatic failover?

    ADeploy in one region with backups
    BDeploy the same service in multiple regions, use a global HTTPS load balancer to route traffic to the nearest healthy region, with Cloud Spanner or Firestore for global data consistency
    CUse Cloud DNS failover only
    DDeploy in all regions at once
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Multi-region Cloud Run: deploy service to us-central1 + europe-west1 + asia-northeast1. Global HTTPS LB with serverless NEGs (one per region). Health checks: auto-route to healthy regions. Database: Cloud Spanner (global strong consistency) or Firestore (multi-region). Cloud CDN for static content. Automatic failover — no manual intervention on region outage.

  13. Question 13Deploying Applications

    How does Cloud Run handle scaling for a newly deployed revision?

    AFixed number of instances
    BAutomatically scales instances based on incoming requests, including scaling to zero
    CManual scaling only
    DScales based on a schedule
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Cloud Run automatically scales container instances from zero to handle incoming requests, scaling up as traffic increases and back to zero when idle, with configurable min/max instances.

  14. Question 14Deploying Applications

    What is the purpose of Cloud Run traffic splitting?

    ASplit network packets
    BGradually shift request traffic between revisions for testing and canary releases
    CSplit logs between destinations
    DDivide compute resources
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Traffic splitting in Cloud Run routes a configurable percentage of requests to different revisions, enabling gradual rollouts and A/B testing without infrastructure management.

  15. Question 15Deploying Applications

    What deployment strategies does Cloud Run support?

    AOnly full deployment
    BGradual rollouts (traffic splitting between revisions), instant rollouts, and rollbacks — route percentage of traffic to new revision while monitoring
    COnly blue-green
    DOnly canary with GKE
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Cloud Run revisions: deploy new revision, split traffic (e.g., 10% new, 90% old), monitor, then shift 100%. Instant rollback by routing traffic to previous revision. Supports tag-based routing for preview URLs.

  16. Question 16Building and Testing Applications

    How should you implement chaos engineering for your Cloud Run and GKE services?

    ABreak production randomly
    BInject controlled failures in a staging environment: kill pods, add latency, simulate service outages — verify that circuit breakers, retries, and fallbacks work as designed
    COnly test in production
    DNever test failures
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Chaos engineering: controlled experiments to verify resilience. GKE: Chaos Mesh or Litmus (inject pod failures, network delays, CPU stress). Service mesh: Istio fault injection (add latency, return errors for a percentage of requests). Verify: circuit breakers trip, retries work, fallbacks activate, alerts fire. Start in staging, graduate to production with blast radius limits.

  17. Question 17Building and Testing Applications

    Where should container images be stored for GKE deployments within Google Cloud?

    ADocker Hub
    BArtifact Registry
    CCloud Storage
    DPersistent Disk
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Artifact Registry is the recommended container registry for GKE, providing regional storage, vulnerability scanning, IAM-based access control, and integration with Cloud Build and GKE.

  18. Question 18Deploying Applications

    What is the recommended tool for deploying applications to GKE with progressive delivery?

    Akubectl apply only
    BCloud Deploy with delivery pipelines
    CManual gcloud commands
    DCloud Console UI
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Cloud Deploy provides managed, opinionated continuous delivery to GKE and Cloud Run with features like delivery pipelines, approval gates, rollback, and canary deployments.

  19. Question 19Deploying Applications

    What are deployment strategies in GKE?

    AOnly recreate
    BRolling update (gradual replacement), Blue-Green (duplicate deployment, switch traffic), Canary (small traffic split), and Recreate (stop old, start new) — each with different tradeoffs
    COnly blue-green
    DCannot control deployments
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    Rolling update: default K8s, gradual pod replacement (maxSurge, maxUnavailable). Blue-Green: two deployments, switch Service selector. Canary: split traffic via Istio/Gateway API weights. Recreate: all-at-once (downtime). Advanced: Cloud Deploy manages promotion + rollback across environments.

  20. Question 20Deploying Applications

    What are GKE deployment strategies?

    AOnly one strategy
    BRolling update (gradual replacement), Blue-green (two deployments, traffic switch), Canary (small traffic percentage to new version), and Recreate (all-at-once replacement)
    COnly rolling
    DOnly blue-green
    Show Answer & Explanation
    Correct Answer: B
    Explanation:

    GKE strategies: Rolling update (default — maxSurge, maxUnavailable), Recreate (kill all old, create new — brief downtime), Blue-green (two deployments, Service selector switch), Canary (Istio traffic splitting: 5% → 25% → 100%). Advanced: Flagger (progressive delivery controller), Cloud Deploy (managed delivery pipeline with approval gates). Choose based on: risk tolerance, downtime tolerance, and resource budget.

Key Deploying Concepts for PCD

deploygkecloud runapp enginecanaryblue-greenrolling updatetraffic splitting

PCD Deploying Exam Tips

Deploying Applications questions in PCD are typically scenario-based. Focus on service-level decision making aligned to official exam objectives. Priority concepts: deploy, gke, cloud run, app engine, canary, blue-green.

What PCD Expects

  • Anchor your answer in select the most practical, secure, and scalable answer for the stated scenario.
  • Deploying scenarios for PCD are frequently mapped to Domain 3 (~20%), so read the objective carefully before picking controls or architecture.
  • Expect multi-service scenarios where Deploying interacts with IAM, networking, storage, or observability patterns rather than appearing as an isolated service question.
  • When two options are both technically valid, prefer the choice that best aligns with the exam's operational scope (Professional) and managed-service best practices.

High-Value Deploying Concepts

  • Know the core Deploying building blocks cold: deploy, gke, cloud run, app engine.
  • Review the edge-case features and limits for canary, blue-green; these details are commonly used to differentiate answer choices.
  • Practice service-integration reasoning: how Deploying pairs with Building & Testing, Integrating Services in real deployment patterns.
  • For PCD, explain why the chosen Deploying design meets reliability, security, and cost expectations better than the alternatives.

Common PCD Traps

  • Watch for answers that partially solve the requirement but miss operational constraints.
  • Questions in Deploying Applications often include distractors that look correct for Deploying but violate least-privilege, durability, or availability requirements.
  • Avoid picking options purely by feature name; validate data path, failure handling, and governance impact before answering.
  • If the prompt hints at automation or repeatability, eliminate manual-only operational answers first.

Fast Review Checklist

  • Can you compare at least two Deploying implementation paths and justify which one best fits the scenario?
  • Can you map the chosen answer back to Deploying Applications (~20%) outcomes for PCD?
  • Can you explain security and access boundaries for Deploying without relying on default-open assumptions?
  • Can you describe how Deploying integrates with Building & Testing and Integrating Services during failure, scaling, and monitoring events?

Exam Domains Covering Deploying

Related Resources

More PCD Study Resources