GitOps & ArgoCD (50 Qs)•Part 1: GitOps Fundamentals & Core Principles (Junior / Entry-Level)
Compare Pull-Based (GitOps) vs Push-Based (Traditional CI/CD).
junior LevelMost AskedCode ExampleCI/CD & DevOps
In Simple Words:
| Dimension | Traditional Push-Based (e.g. Jenkins / GitHub Actions) | GitOps Pull-Based (e.g. ArgoCD) |
|---|---|---|
| Execution Vector | CI pipeline runs kubectl apply from outside the cluster | An agent inside the cluster polls Git and reconciles |
| Cluster Credentials | Sensitive cluster admin credentials must be given to external CI | Cluster credentials never leave the cluster |
| Firewall Ports | Inbound network port (Kubernetes API 6443) must be open to CI | Only outbound HTTPS access to GitHub is required |
| Drift Correction | If an engineer modifies a pod with kubectl, CI doesn't know | ArgoCD detects drift instantly and automatically overwrites it |
| Security Risk | High (compromised CI pipeline compromises the entire cluster) | Minimal (external systems cannot push code to the cluster) |
scss
── Push Model (Legacy) ──
[ GitHub Actions ] ──(Needs Cluster Admin Kubeconfig)──► [ Kubernetes API ]
── Pull Model (GitOps) ──
[ Git Repo (Source of Truth) ]
▲
│ (Outbound Poll via HTTPS / SSH)
[ ArgoCD inside Kubernetes ] ──(Local Internal Apply)──► [ Cluster Resources ]