aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • DevOps
  • Software

Solving Configuration Drift Using GitOps With Argo CD

  • aster.cloud
  • December 18, 2020
  • 5 minute read

Argo CD (part of the Argo project) is a deployment solution for Kubernetes that follows the GitOps paradigm.

 


Partner with aster.cloud
for your next big idea.
Let us know here.



From our partners:

CITI.IO :: Business. Institutions. Society. Global Political Economy.
CYBERPOGO.COM :: For the Arts, Sciences, and Technology.
DADAHACKS.COM :: Parenting For The Rest Of Us.
ZEDISTA.COM :: Entertainment. Sports. Culture. Escape.
TAKUMAKU.COM :: For The Hearth And Home.
ASTER.CLOUD :: From The Cloud And Beyond.
LIWAIWAI.COM :: Intelligence, Inside and Outside.
GLOBALCLOUDPLATFORMS.COM :: For The World's Computing Needs.
FIREGULAMAN.COM :: For The Fire In The Belly Of The Coder.
ASTERCASTER.COM :: Supra Astra. Beyond The Stars.
BARTDAY.COM :: Prosperity For Everyone.

Deploying to Kubernetes with Argo CD

In the most basic scenario, Argo CD continuously monitors a Git repository with Kubernetes manifests (Helm and Kustomize are also supported) and listens for commit events.

When a commit happens (usually one that updates the versions of the image artifacts), Argo CD starts a “synchronization” process that is responsible for bringing the cluster configuration in the same state as described in Git.

When the sync process is complete we know that the application configuration is exactly the same as the Git manifests.

The Argo CD deployment process is the embodiment of the central ideas behind GitOps:

  • All application configuration is stored in Git (usually in a separate repository than the source code)
  • Deployments are happening in a “pull” manner where the cluster is fetching manifests from Git (instead of traditional solutions where updates are “pushed” to the cluster)
  • A deployment is a reconciliation process between the two states (what is described in Git versus what is deployed in the cluster)

Even though the sync process is vital for performing the initial deployment of the application, one of the true strengths of Argo CD is the continuous monitoring of both states (cluster and Git) *after* the deployment takes place. This continuous monitoring is very important for solving configuration drift which is a very common issue in organizations with a large number of deployment targets.

 

Configuration drift between different Kubernetes clusters

Configuration drift is a problem that existed even with traditional Virtual Machines and it has plagued production deployments long before Kubernetes appeared on the scene. The problem manifests itself when the CI/CD platform performs a deployment to multiple targets and it fails because a set of machines that were supposed to be similar are in fact differently configured.

Read More  2022 Trends In Cloud Computing: Poly Cloud Specialization

In several organizations, developers use a “staging” environment to test their application right before it is deployed in production. Ideally, the staging environment should match the configuration of the production one, so that developers are confident that any testing they perform in staging will closely match the production environment.

Specifically with Kubernetes clusters, it is very common for teams to use ad-hoc commands (i.e. via `kubectl`) to perform changes on a cluster that are completely outside of the CI/CD process.

These ad hoc changes are a major issue for application deployments. Differences in configuration are one of the most common causes of failed deployments. An application that is passing all tests with flying colors in a staging environment, results in a broken state in production because the required settings were not present or in the expected format.

Another hidden problem that stems from configuration drift is the gradual loss of knowledge on what exactly is deployed on a machine/Node and when exactly was the last change. Argo CD solves this problem by using Git as the source of truth for the present deployment and all past ones.

After a failed deployment, operators and developers are trying to understand the causes of the incident and one of the first questions they ask is “what was the last thing that changed in this cluster”. This question is very hard to answer if uncontrolled changes can happen to the cluster outside of the approved CI/CD process.

 

How Argo CD detects configuration drift issues

Argo CD takes a completely different approach to deployments (the “pull from Git” paradigm). Because all deployments can be traced back to Git commits, the Git commit history is also the cluster deployment history.

Read More  How A Frictionless Developer Experience Improves Software Development

Developers can use their favorite Git tools to answer questions like “What was deployed on the cluster last Thursday?” or “What changed between Monday and Thursday this week?”

Let’s say however that a person from the team completely bypasses Argo CD and performs a manual change straight to the cluster using kubectl. Other CI/CD solutions will be completely oblivious to this change, paving the way for a configuration drift issue.

Argo CD will understand instead that something was changed on the cluster and the two states (cluster configuration and Git manifests) are no longer the same. The deployment will instantly be marked as “out-of-sync”.

Argo CD will also dig deeper and even present a nice diff overview of what was changed:

In the example above, Argo CD detected that the port configuration of a service is no longer the same between the cluster and Git.

Once you detect a discrepancy like this you can either manually bring the application to the same state as the Git (performing the sync process again) or instruct Argo CD to automatically sync on its own when it detects configuration changes.

This means that with Argo CD configuration drift (at least for Kubernetes applications) is completely eliminated, especially if the auto-sync behavior is enabled.

Teams that use Argo CD can deploy with confidence because they know that the cluster is in the state it is supposed to be (and that state is also fully described in the Git manifests). Configuration drift is not an issue anymore and keeping staging and production as close as possible is a very easy process.

Read More  Kubernetes RBAC 101: Authorization

 

Combining Argo with a Devops Platform

Apart from the main Argo CD project,  you might also find Argo Rollouts interesting. Argo Rollouts is another Argo project for performing progressive (blue/green/canary) deployments to Kubernetes.

Argo CD and Argo Rollouts are great for handling application deployments but they need to be coupled with a full automation solution that will also handle all other aspects of the software lifecycle such as application builds, unit tests, secret management, and pull request handling, etc.

Argo CD works great for taking care of the actual deployment, but it assumes that the artifact is already created by another solution. This is why we have been working hard to integrate Codefresh and Argo together in order to cover the full software lifecycle and even cover the scenario of pushing automatically a change to the manifest Git repository monitored by Argo (i.e. performing automatic commits and thus practicing Continuous Deployment).

Visit the main Argo Website for more information.

Kostis Kapelonis is a developer advocate at Codefresh, a continuous delivery platform build for Kubernetes and containers. Formerly a Software Engineer, Kostis has years of experience containerizing applications, building CI/CD pipelines, and developing Java applications. He lives in Greece and loves roller skating.

 

Source: CNCF Blog by Kostis Kapelonis


For enquiries, product placements, sponsorships, and collaborations, connect with us at [email protected]. We'd love to hear from you!

Our humans need coffee too! Your support is highly appreciated, thank you!

aster.cloud

Related Topics
  • Argo CD
  • Codefresh
  • GitOps
  • Kubernetes
You May Also Like
View Post
  • Software
  • Technology

Canonical Releases Ubuntu 25.04 Plucky Puffin

  • April 17, 2025
View Post
  • Software
  • Technology

IBM Accelerates Momentum in the as a Service Space with Growing Portfolio of Tools Simplifying Infrastructure Management

  • March 27, 2025
Vehicle manufacturing
View Post
  • Software

IBM Study: Vehicles Believed to be Software Defined and AI Powered by 2035

  • December 12, 2024
aster-cloud-tux-gaming
View Post
  • Computing
  • Gears
  • Software

5 best Linux distributions for gamers in 2024

  • September 11, 2024
Crab
View Post
  • Gears
  • Learning
  • Software

The Best Friends for a Rustacean. Top Books in Learning Rust.

  • August 25, 2024
Coffee | Laptop | Notebook | Work
View Post
  • Software

The Hidden Economy Of Open Source Software

  • April 28, 2024
Redis logo
View Post
  • Platforms
  • Software

Redis Moves To Source-Available Licenses

  • April 2, 2024
View Post
  • Software
  • Technology

Charmed MongoDB Enters General Availability

  • March 26, 2024

Stay Connected!
LATEST
  • college-of-cardinals-2025 1
    The Definitive Who’s Who of the 2025 Papal Conclave
    • May 7, 2025
  • conclave-poster-black-smoke 2
    The World Is Revalidating Itself
    • May 6, 2025
  • oracle-ibm 3
    IBM and Oracle Expand Partnership to Advance Agentic AI and Hybrid Cloud
    • May 6, 2025
  • 4
    Conclave: How A New Pope Is Chosen
    • April 25, 2025
  • Getting things done makes her feel amazing 5
    Nurturing Minds in the Digital Revolution
    • April 25, 2025
  • 6
    AI is automating our jobs – but values need to change if we are to be liberated by it
    • April 17, 2025
  • 7
    Canonical Releases Ubuntu 25.04 Plucky Puffin
    • April 17, 2025
  • 8
    United States Army Enterprise Cloud Management Agency Expands its Oracle Defense Cloud Services
    • April 15, 2025
  • 9
    Tokyo Electron and IBM Renew Collaboration for Advanced Semiconductor Technology
    • April 2, 2025
  • 10
    IBM Accelerates Momentum in the as a Service Space with Growing Portfolio of Tools Simplifying Infrastructure Management
    • March 27, 2025
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • 1
    Tariffs, Trump, and Other Things That Start With T – They’re Not The Problem, It’s How We Use Them
    • March 25, 2025
  • 2
    IBM contributes key open-source projects to Linux Foundation to advance AI community participation
    • March 22, 2025
  • 3
    Co-op mode: New partners driving the future of gaming with AI
    • March 22, 2025
  • 4
    Mitsubishi Motors Canada Launches AI-Powered “Intelligent Companion” to Transform the 2025 Outlander Buying Experience
    • March 10, 2025
  • PiPiPi 5
    The Unexpected Pi-Fect Deals This March 14
    • March 13, 2025
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.