Course contentsShow
← Cloud and Infrastructure
Lesson 1857 of 2,98939. GitOps PrinciplesFree lesson

Pull-Based Deployment Model

How agents in the cluster pull desired state from Git rather than external CI pushing changes.

Pull-Based Deployment Model

What you'll learn: How GitOps agents inside your cluster autonomously pull configuration from Git instead of external CI systems pushing changes into your environment.

The Core Idea

In traditional CI/CD, your build pipeline pushes changes into your infrastructure—a CI server authenticates to your cluster, runs kubectl apply, and forces the new state. This creates a security problem: external systems need powerful credentials to your production environment.

The pull-based model inverts this flow. Instead of external systems pushing in, an agent inside your cluster continuously watches your Git repository and pulls the desired state whenever it changes. The agent then reconciles the actual cluster state with what Git declares should exist.

How It Works

Think of it like a thermostat: rather than you manually adjusting the heat every few minutes (push), the thermostat constantly monitors the temperature and adjusts automatically to match your desired setting (pull).

Traditional Push Model:

  • CI/CD server builds container image
  • CI/CD server connects to cluster with credentials
  • CI/CD server runs deployment commands
  • Cluster passively receives changes

GitOps Pull Model:

  • CI/CD server builds container image, updates Git manifest
  • Agent inside cluster notices Git changed
  • Agent pulls new manifest from Git
  • Agent applies changes to match desired state

Security and Benefits

The pull model eliminates the need to give external systems cluster credentials. Your cluster only needs outbound Git access (often already allowed). The agent handles authentication internally, and Git remains your audit trail.

Key Takeaway: Pull-based deployment shifts control from external CI systems to in-cluster agents that autonomously sync state from Git, improving security by eliminating the need to expose cluster credentials externally.