Skip to main content

Command Palette

Search for a command to run...

What is GitOps?

Updated
β€’3 min read
What is GitOps?
S

πŸ‘‹Hello, Hashnode community! I'm subbaramireddy, a passionate DevOps Engineer with a relentless commitment to optimizing software development workflows and infrastructure management. πŸš€ Hands-on experience in the DevOps field, I've honed my skills in AWS cloud services, containerization, and CI/CD pipelines. As an AWS Certified Developer, I'm well-versed in leveraging cloud technologies to drive efficiency and innovation. πŸ’‘ I firmly believe in the power of continuous improvement. My journey began with an internship, where I immersed myself in the intricacies of DevOps, from deploying web applications to orchestrating containerized solutions. I've also delved into AWS CDK, enhancing security through RDS instance policies, and creating foundational infrastructure with precision. 🌐 My goal is to share insights, best practices, and the latest trends in the DevOps landscape. I'm excited to connect with like-minded professionals, engage in meaningful discussions, and learn from the diverse experiences of the Hashnode community. πŸ“ Let's explore the ever-evolving world of DevOps together. Feel free to connect with me, ask questions, or share your own insights. Together, we can drive innovation and efficiency in the tech world!

GitOps

GitOps is a framework where the entire code is controlled by the git.

GitOps can be considered an extension of Infrastructure as Code (IaC) that uses Git as the Version control System.

GitOps Principles

  1. Declarative vs imperative

  2. Make use of Git.

  3. Pull Request

  4. Reconcile Loop

DevOps Vs GitOps

Push vs Pull based Deployments

GitOps Features

GitOps Benefits & Challenges

Pro's

  • Lightweight and Vendor-neutral

  • Faster, Safer, Immutablem and Reproducible Deployments

  • Eliminating configuration drift

  • uses familiar tools and processes

  • Revisions with history

Con's

  • Doesn't help with Secret Management

  • Number of Git repositories

  • Challenges with programmatic updates.

  • Governance other than PR approval.

  • Malformed YAML/Config manifests.

GitOps Projects/Tools

ArgoCD:

FluxCD

Atlantis

Autoapply

CloudBees Rollout:

JenkinsX: CI/CD Platform

Flagger:

Ignite: VM Manager

Faros

Helm Operator

Weave GitOps Core

KubeStack

Weave Cloud

GitKube

PipeCD

Werf

What is ArgoCD?

  • Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes resources defined in a Git repository.

  • Continuously monitors running applications and compares their live state to the desired state.

  • It reports the deviations and provides visualizations to help developers manually or automatically sync the live state with the desired state.

Why use ArgoCD

  • It extends the benefits of declarative specifications and Git-based configuration management.

  • It is the first step in achieving continuous operations on monitoring, analytics, and automation remediation.

  • It can deploy to multiple clusters and is Enterprise-friendly( audibility, compliance, security, RBAC, SSO and a lot more.

How ArgoCD works?

  • It follows the GitOps pattern by using Git repositories as the source of truth for the desired state of the app and the target deployment envs.

Kustomize applications

Helm Charts

Ksonnet applications Jsonnet files

YAML/JSON manifests

  • It automates the synchronization of the desired application state with each of the specified target environments.

ArgoCD Concepts & Terminology

ArgoCD Features

  1. Automated deployment of applications to specified target environments in multiple clusters.

  2. Support for multiple config management/templating tools (Kustomize, Helm, Ksonnet, Jsonnet, plain-YAML).

  3. SSO Integrations (OIDC, OAuth2, LDAP, SAML 2.0, GitHub, GitLab, Microsoft, Linkedin)

  4. Multi-tenancy and RBAC policies for authorization.

  5. Rollback/Roll-anywhere to any application configuration committed in the Git repository.

  6. Health status analysis of application resources.

  7. Automated configuration drift detection and visualization.

  8. Out-of-the-box Prometheus metrics.

  9. Audit trails for application events and API Calls

  10. PreSync, Sync, and PostSync hooks to support complex application rollouts (e.g. blue/green & Canary upgrades).

  11. Webhook integration (GitHub, BitBucket, GitLab).

  12. CLI and access tokens for automation and CI integration.

  13. Web UI which provides a real-time view of application activity.

  14. Automated or manual syncing of applications to their desired state.

ArgoCD Architecture

Installation Options

ArgoCD has two types of installations.

Core

Multi-Tenant

ArgoCD Commands

argocd login ipaddress-argocd-server

argocd app list

argocd cluster list

ArgoCD Application

Creating application using the cli

Demo Application

ArgoCD CLI
argocd app create application

argocd app list

argocd app sync application Name

argocd proj list

Reconciliation Loop

Using Timeout

The default timeout is 3 minutes

WebHook

Application Health Checks

ArgoCD supports custom health checks written in Lua.

Define a custom Health check in argocd-cm ConfigMap.

Contribute custom Health Checks.


Thanks for reading! I hope you found this helpful and informative.

I'm always happy to connect with fellow tech enthusiasts and answer any questions you may have. Don't forget to follow me for more updates on tech, programming, and more.πŸ˜„πŸ˜„

Follow me on LinkedIn to see interesting posts like this : ) Linkedin