Difference Between GitOps And Traditional CI/CD

8/10/2020

In normal kubernetes CI/CD process , following process occurs :

  • clone code from git
  • build and push docker image
  • update kubernetes deployment with updated code

According to gitops definition

GitOps is a new approach to Continuous Deployment that leverages Git as a single source of truth for declarative infrastructure and applications, providing both revision and change control. With GitOps, a system is run by submitting pull requests (and subsequent merges) to achieve the desired state of the system represented in a Git repository

what my understanding of gitops is , when you update anything in git (as this is the source of truth) , the desired state of kubernetes changes to the latest one and the latest code is deployed.

End Result of traditional CI/CD without gitops: new code is deployed as kubernetes deployment

End Result of gitops: new code is deployed as kubernetes deployment

I am unable to figure the difference . sorry if it sounds weird to you. But I am kinda new and exploring gitops .

Thanks in advance for your response

-- hanzala
continuous-deployment
continuous-integration
git
kubernetes

2 Answers

8/22/2021

Short answer - GitOps is a framework, CI/CD is a process!

GitOps aims at leveraging Git as a source of truth and empowers developers to perform IT operations. It automates Git workflow with continuous integration and continuous delivery (CI/CD). Let me take an example here - I have a kubernetes cluster for which I have CI/CD pipelines setup for automation, yet we used to see incidents where someone made a manual change to the application version directly on cluster(happens everywhere!). We leveraged GitOps to have a declaration of my cluster so that everytime someone made manual changes, it would override and bring it back to it's original stated declared in Git (done using GitOps agent like Flux).

-- Jay
Source: StackOverflow

8/11/2020

CICD focuses on the whole chain:

  • You checkin your code
  • Code get tested
  • Container created and uploaded
  • Container get deployed
  • Container get tested

Plus many other steps in between. That’s why it is a continuous integration & deployment. You also could say, an end to end process.

GitOps don’t care about your code, the docker build or so. It purely focus on keeping your apps updated (deployment part), in extreme form with Progressive Delivery fully automated with traffic shifting and health checks, auto fall back etc.

Beside this you have other small details which sometimes matter like push vs pull, cluster autonomy, separation of concerns.

-- mkorbi
Source: StackOverflow