Should CI push deploys to Kubernetes, or should the cluster pull them?

BeginnerScenarioPipelines at scale
Answer

Situation read → Push (CI runs kubectl or helm) is simple. Pull (Argo CD or Flux syncing from Git) is safer and self-correcting at scale.

What I'd do →

  1. Push is fine for small setups: one cluster, one team, quick start. The downside is that CI needs cluster credentials and nothing corrects drift.
  2. Pull for production at scale:
    • No cluster credentials in CI; the agent runs inside the cluster.
    • Git is the source of truth, with drift detection and self-heal.
    • Rollback is a Git revert, and history is the audit log.
  3. A common hybrid: CI builds and pushes the image, then updates the image tag in the GitOps repo; Argo CD deploys.

Why → Pull removes the most powerful credential from your CI system and keeps clusters matching Git.

Interview tip → Lead with the security argument (no cluster creds in CI); it's the strongest one.

All Real-World Interview questions Roadmap: Interview readiness

More on Pipelines at scale