What is GitOps?
It is a technical practice that follows the DevOps philosophy.
You define the desired infrastructure configs in git, and a tool or an operator software that sits in your infrastructure watches for any changes in git. If it detects any change in git, it applies those changes to the infrastructure and brings it to the desired state.
Also, the operator software continuously monitors the state of the infrastructure. If the infrastructure deviates from the desired state (let’s say due to a manual change), the operator software ensures the infrastructure comes back to the desired state.
For example, in git, the infra config says, for autoscaling, the minimum instance count is 3, and the max is 9. The operator software deploys the autoscaling group with the values in Git.
Assume someone does a manual change, now the autoscaling min and max count is 4 and 12 now. Since the operator software continuously monitors the infrastructure, it identifies the configuration drift as compared to the git config.
So it rollbacks the manual changes to match the desired state in git.
Now, when it comes to Gitops, you mostly hear implementations around Kubernetes using Kubernetes operators.
But the GitOps workflow can be implemented using any tool that supports the workflow.
At a high level, GitOps aims to bring the following.
Git as the source of truth
Developer-centric infra workflows
Good traceability of infra changes
Consistency and Standardization
Security.
No manual changes.
With Gitops workflow, infrastructure engineers/developers can focus more on engineering and innovation than on infrastructure management and maintenance.
Check comments for further resources to understand GitOps.