Maven / GitOps Interview Questions
What is the difference between GitOps and Infrastructure as Code (IaC)?
IaC and GitOps address different layers of the stack and use different execution models, but they complement each other in modern cloud-native environments.
Infrastructure as Code (Terraform, Pulumi, CloudFormation): Provisions cloud resources — VMs, VPCs, managed databases, load balancers, Kubernetes clusters themselves. IaC is typically applied imperatively by a human or pipeline (terraform apply). State is tracked in a tfstate file (local or remote in S3/Terraform Cloud). It answers the question: "What cloud infrastructure should exist?"
GitOps: Deploys and manages application workloads and configuration on top of already-provisioned infrastructure. The GitOps operator runs continuously, reconciling the live cluster to match the Git-declared desired state. It answers the question: "What should be running on this Kubernetes cluster right now?"
| Dimension | IaC (Terraform) | GitOps (Argo CD / Flux) |
|---|---|---|
| Target | Cloud resources (EKS, RDS, VPC) | Kubernetes workloads and config |
| Execution model | Imperative plan/apply triggered by human or pipeline | Continuous pull-based reconciliation loop |
| State storage | tfstate file (S3, Terraform Cloud) | Git repository |
| Drift correction | Manual re-apply needed | Automatic on each reconciliation cycle |
They are complementary, not competing: Terraform provisions the EKS cluster, GitOps manages what runs on it. The boundary blurs with tools like Crossplane and Cluster API, which represent cloud resources and Kubernetes clusters as Kubernetes CRDs — making it possible to manage infrastructure provisioning through a GitOps operator.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
