You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Google Cloud Deploy is a fully managed continuous delivery service that automates the deployment of applications to GCP targets such as GKE, Cloud Run, and Anthos. It provides a structured delivery pipeline with promotion between environments, approval gates, rollback capabilities, and deployment verification — all managed through a declarative configuration.
Cloud Deploy is the CD (Continuous Delivery) counterpart to Cloud Build's CI (Continuous Integration). While Cloud Build handles building and testing, Cloud Deploy manages the progression of artefacts through deployment environments.
| Characteristic | Description |
|---|---|
| Managed delivery | Google handles the deployment infrastructure |
| Progressive delivery | Promote releases through environments (dev → staging → production) |
| Approval gates | Require manual approval before production deployments |
| Rollback | One-click rollback to any previous release |
| Render and deploy | Separates manifest rendering from deployment execution |
| Audit trail | Full history of every release, promotion, and rollback |
| Canary deployments | Gradual rollout with automatic traffic shifting |
A delivery pipeline defines the sequence of targets (environments) that a release must progress through:
# clouddeploy.yaml
apiVersion: deploy.cloud.google.com/v1
kind: DeliveryPipeline
metadata:
name: my-app-pipeline
description: Pipeline for my-app
serialPipeline:
stages:
- targetId: dev
profiles: [dev]
- targetId: staging
profiles: [staging]
- targetId: production
profiles: [production]
strategy:
canary:
runtimeConfig:
cloudRun:
automaticTrafficControl: true
canaryDeployment:
percentages: [25, 50, 75]
verify: true
A target is a deployment destination — a GKE cluster, Cloud Run service, or Anthos cluster:
apiVersion: deploy.cloud.google.com/v1
kind: Target
metadata:
name: dev
description: Development environment
run:
location: projects/my-project/locations/europe-west1
---
apiVersion: deploy.cloud.google.com/v1
kind: Target
metadata:
name: staging
description: Staging environment
run:
location: projects/my-project/locations/europe-west1
requireApproval: false
---
apiVersion: deploy.cloud.google.com/v1
kind: Target
metadata:
name: production
description: Production environment
run:
location: projects/my-project/locations/europe-west1
requireApproval: true
A release is a specific version of your application (a container image) that progresses through the pipeline:
# Create a release
gcloud deploy releases create release-001 \
--delivery-pipeline=my-app-pipeline \
--region=europe-west1 \
--images=my-app=europe-west1-docker.pkg.dev/my-project/my-repo/my-app:v1.0.0
A rollout is the deployment of a release to a specific target. Each promotion creates a new rollout.
# Apply the pipeline and target configuration
gcloud deploy apply --file=clouddeploy.yaml --region=europe-west1
Cloud Deploy uses Skaffold to render and deploy manifests:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.