Let’s Understand about GitOps

Introduction to GitOps

From the history if we have seen the growth of deployment phase, it has improved lot of ways. We all know how the deployments were happen half of the decade before, mostly it was manual or some basic automation script was used. Later we all know the how it was changed once containers got introduced. Containers has helped administrators to roll-out deployments within a second. Then again it took fast ways to roll-out production deployments by ensuring the scalability so that it meets the demand via orchestrators like Kubernetes.

Same time, when it comes to standard containers, workflow, it was not able to meet the ever-growing business demands. Even though we still there are a need for more efficient deployment and scaling of container clusters over Kubernetes which still could help to improve the deployment cycle.

We have got one best solution for that now, called GitOps. In this post let’s see what is the GitOps, its principles and benefits.

What is GitOps?

From the page mentions, “GitOps is a way of implementing Continuous Deployment for cloud native applications. It focuses on a developer-centric experience when operating infrastructure, by using tools developers are already familiar with, including Git and Continuous Deployment tools.

The core idea of GitOps is having a Git repository that always contains declarative descriptions of the infrastructure currently desired in the production environment and an automated process to make the production environment match the described state in the repository. If you want to deploy a new application or update an existing one, you only need to update the repository — the automated process handles everything else. It’s like having cruise control for managing your applications in production.”

Here some details how GIT can be used,

  • Code — Developers can write a code and push it to Git.
  • Build (Pipeline as Code) — Build pipeline code(yaml) in Git to build code using CI tools.
  • Provision (Infrastructure as Code) — Write a terraform file or any configuration management playbook or cookbooks in Git to provision a Kubernetes cluster.
  • Deploy — Write a deployment manifest for Kubernetes or based on the application.


  • Use Git as a source of truth
  • Get version control, history, peer review, and rollback for all your ops code
  • Continuous Delivery- Automates pipelines
  • Webhooks: push to trigger build/test
  • PR’s & merge branch to deploy

Git Source of Truth

  • Infrastructure as a Code — Terraform, Pulumi, CloudFormation.
  • Configuration as a Code — Ansible, Chef, Puppet, salt etc.
  • Application Configuration as Code — Kubernetes, etc.

Basic Principles

GitOps has own principles, as mentioned below,

Everything as a code

GitOps forces to keep everything as a code, such as infrastructure, policy, configuration and security etc. With this everything can be tracked and make sure all the changes are documents in detail. This helps to understand everyone about your environments and setup details.

Single source of truth

GitOps follows VCS as a single source of truth, such as git. It helps to compare the configuration drift & helps in having an audit trail to make misconfiguration tracing easy. This makes error recovery as easy as issuing a git revert and watching your environment being restored.

Approved changes

Once PR is reviewed and merged in the configuration, it gets directly applied to the system.

Easy Credential management

GitOps allows you to manage deployments completely from inside your environment. For that, your environment only needs access to your repository and image registry. That’s it. You don’t have to give your developers direct access to the environment.

Continue reading full article on Let’s Understand about GitOps — FoxuTech



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store



Discuss about #Linux, #DevOps, #Docker, #kubernetes, #HowTo’s, #cloud & IT technologies like #argocd #crossplane #azure https://foxutech.com/