MLOps
Platform Engineering
Push vs Pull CI/CD: Cloud Run and Kubernetes
Understanding the architectural differences between push-based deployments for Cloud Run and pull-based GitOps for GKE.
•
7 min read
Push Deployments for Serverless
In a serverless environment like Google Cloud Run, CI/CD pipelines typically follow a "Push" methodology. A CI server like Jenkins runs imperative commands (e.g., gcloud run services replace) to directly mutate the state of the infrastructure.
Conversely, Kubernetes deployments utilizing ArgoCD follow a "Pull" approach. Instead of interacting with the cluster directly, the CI pipeline simply updates the declarative manifests (such as a values.yaml image tag) in a Git configuration repository. ArgoCD then detects this drift and automatically syncs the cluster state.
yaml
# GKE Config Repo: values.yaml
image:
repository: asia-southeast2-docker.pkg.dev/project/repo/app
tag: "1.0.2" # Jenkins only updates this line
Deployment Flow
flowchart LR
Jenkins-- "Push (gcloud run)" -->CloudRun
Jenkins-- "Commit Tag" -->GitRepo
ArgoCD-- "Pull (Sync)" -->GitRepo
ArgoCD-- "Apply" -->GKE