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 →
- Push is fine for small setups: one cluster, one team, quick start. The downside is that CI needs cluster credentials and nothing corrects drift.
- 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.
- 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.
More on Pipelines at scale
The CI pipeline takes 45 minutes. Developers want it under 10. How do you approach it?IntermediateYou have a monorepo with 40 services. Every commit builds and tests all of them. How do you fix that?AdvancedFlaky tests fail 1 in 5 runs and developers just click "re-run". How do you fix this culture and the tests?BeginnerYour self-hosted GitHub runners can't keep up at peak and sit idle at night. How do you run them at scale?AdvancedDocker builds in CI take 12 minutes because every runner starts with an empty cache. How do you speed them up?IntermediateHow do you secure the software supply chain from commit to production?Advanced