GitOps - CD for Cloud-Native Apps

Get a Quote

GitOps – CD for Cloud-Native Apps

What Is It

GitOps is a paradigm for Kubernetes cluster management that uses Git as the source of truth for declarative applications and infrastructure, and can be thought of as a cloud-native operational model.

How Is It Different

GitOps Is A Pull-Based Model

  • Rather than CI/CD we think of it as a CD/CO (continuous delivery/continuous operations) model
  • The majority of CI/CD tools available today use a push-based model. A push-based pipeline means that code starts with the CI system and then continues its path through a series of encoded scripts to push changes to the Kubernetes cluster
  • Pull relates to the Operator installed to the cluster that watches the image repository for new updates

Why Use This Approach

  • GitOps takes full advantage of the move towards immutable infrastructure and declarative container orchestration
  • The approach helps to prevent configuration drift

What Does This Look Like

In a pull pipeline, a Kubernetes Operator reads new images from the image repository from inside the cluster.

At the centre of the GitOps pattern is the Operator/Agent. It monitors the single source of truth (a config repo) that contains the deployment manifest and the actual state in the cluster.

The Operator constantly monitors the Actual State in the cluster, and the Desired State defined in the Repo

Separation of Concerns

The pipelines can only communicate by Git updates:

  • Whenever Git is updated, the Operator is notified.
  • Whenever the Operator detects drifts, monitoring and alerting tooling are notified

Benefits

  • Consistency
    • Production states match your test environments
  • Reliability
    • With Git’s capability to revert/rollback and fork, you gain stable and reproducible rollbacks
  • Developer Experience
    • Focus on developer code rather than Kubernetes experience (faster onboarding)
  • Standards and Consistency
    • One model for apps, Infra and Kubernetes changes
  • Enhanced Security
    • Reduced potential to expose credentials outside of your cluster

GitOps 3 Initialisms

Argocd in 5 Minutes (Example)

Prerequisites

To be installed and running

Set Alias



Create Namespace and Install Argocd in Your Local Cluster

View Running Pods

Set Port Forwarding


Login to the UI

Access

Deploy Sample App and View in the UI

Delete / Cleanup

Useful Tools

References

Back

Other Articles You May Also Like

A Day in the Life of a CrowdTester (aka The Busy Mum)

In my last blog, I discussed the different backgrounds of our freelanc... more

A Day in the Life of a Crowdtester (aka the contractor in between jobs)

As promised in our ‘daily life’ blog featuring the busy mum, we’re bac... more

Get in touch with us today. Send us a quick message.

*for employment enquiries please contact us via our Careers page