GitOps - An operating model for building cloud native applications
- GitOps is a way to do Kubernetes cluster management and application delivery.
- Use of the Git version control system to track and approve changes to the infrastructure and runtime environment of applications.
- The term "GitOps" was popularized in 2017 by Alexis Richardson of Weaveworks[1].
- Developer-centric experience for managing applications and infrastructure.
- Fully automated pipelines/workflows in Git are used for development and operations.
- The entire system is described declaratively
- The desired system state is versioned in Git
- Approved changes to the desired state are automatically applied to the system
- Software agents ensure correctness and alert on divergence
- Increased Productivity - Mean Time to Deployment
- Enhanced Developer Experience - Push code and not containers
- Improved Compliance and Stability - Git provides an audit log for changes
- Higher Reliability - Git capability to revert/rollback, Mean-Time-To-Recovery (MTTR)
- Increased Consistency and Standardization - infrastructure, apps, and Kubernetes driven by consistent workflow - Pull Requests
- Stronger Security Guarantees - Git strong correctness and security guarantees, ability to sign changes to prove authorship and origin
- Declarative models describe the desired state
- Imperative models describe a sequence of instructions to achieve the desired state
- Declarative systems are idempotent; imperative systems are not
- Kubernetes is a declarative system that regularly reconciles desired state with the running state
- Application deployments are defined using declarative format
- Applications are deployed to environments
- An environment is a collection of applications and associated resources
- An environment could be a Kubernetes namespace, the whole cluster, or multiple federated clusters
- Production, Staging, and Preview are examples of environments
- Environments define the desired state of a collection of applications and resources
- We need to be able to update the state of the environment to reflect the desire to have a new version of the application deployed
- Environment repositories contain references to all the manifests of individual applications and environment specific parameters
- We have individual applications and environments
- ArgoCD
- Flux