GitOps is a modern approach to managing infrastructure and application deployment using Git as the single source of truth. It applies DevOps practices—like version control, CI/CD, and automation—to infrastructure.

Core Concepts of GitOps:

  1. Git as the Source of Truth:

    All infrastructure and deployment configurations are stored in a Git repository. This includes Kubernetes manifests, Helm charts, Terraform files, etc.

  2. Declarative Descriptions:

    Desired system state is described in a declarative way (e.g., YAML files for Kubernetes).

  3. Automated Reconciliation:

    A GitOps agent (like Argo CD or Flux) continuously watches the Git repo and automatically applies changes to the live environment to match the desired state.

  4. Pull-Based Deployment:

    Instead of pushing changes from a CI/CD pipeline, GitOps tools pull updates from the Git repository, making the system more secure and observable.

  5. Audit and Rollback:

    Every change is tracked via Git commits, enabling easy auditing and rollback by reverting commits.