Hello, readers! This article talks about Introduction to Argo CD in Kubernetes as a GitOps tool.
So, let us begin! 🙂
What is Argo CD?
Before discussing Argo CD, let us try to understand the importance of Continuous Delivery in the domain of the Cloud.
Consider an application deployed on the Kubernetes environment. The application runs smoothly and functions well. After some time, the core app team decides to run the same application on a higher version of the image for the sake of some enhancements.
In this scenario, if this was to be done manually, the app team needs to reconfigure the deployment files across all the environments to reflect this change.
This is a caveat for large-scale deployments and maintenance of such configuration is tedious and difficult to handle.
To solve the issue of this Continuous delivery, we have Argo CD in the picture.
Argo CD is a continuous delivery tool for Kubernetes-based applications. It is based on a declarative assessment approach. It follows the GitOps pattern that makes use of Git repositories as the only source of engagement or change.
Talking about the GitOps approach, it is an approach where the configurations or deployments of the applications are completely based on Git as the source of the control system. It leverages the concept of Infrastructure as a Code and DevOps by setting up Git as the source of data/change for all the CRUD operations on the underlying application.
Let us now understand the features of having applications integrated with Argo CD in the upcoming section.
Why choose Argo CD?
- By integrating applications with Argo CD, the deployment and change lifecycle of the application becomes fully automated.
- We can maintain the versions of the system configurations through Argo CD.
- We can orchestrate the Kubernetes manifest files of the applications.
- It also supports the management of Kubernetes manifests files in different forms such as Helm charts, kustomization objects, plain YAML files, etc.
- Easy replication of the configurational app changes by making Git as the only source of change.
- Consistency rollback of the application changes.
Argo CD – Architectural Overview
As discussed above, the entire concept of Argo CD revolves around the concept of Git as the only source of truth.
Let us have a look at some of the important components of Argo CD-
- Git Repository: It contains all the YAML and manifest files. This is considered as the only source of information for a change or deployment at every stage.
- Argo CD User Interface: Argo CD offers us an interactive web user interface to configure and monitor applications post-installation.
- Repository Server: This component is responsible for maintaining the local caches from the Git repositories along with the application level manifest files.
- API Server: It is a REST server that exposes the API consumed by the Web user interface, CI/CD structures, etc. The API Server is responsible for managing the status of the applications across the Argo CD infrastructure. It is even responsible for managing the credentials of the clusters as well as the repository.
- Redis & Dex Server: The Dex server is an in-memory database and has inconsistent data into it. The Redis Server is a cache service for the entire application.
- Application Controller: It is the heart of the entire set up. The Application Controller is responsible for monitoring the running applications across the Argo CD server. It also compares the current state of the application with the desired state and returns OutofSync as the status for us to take the corrective measures accordingly.
Working of Argo CD
Argo CD follows the approach of GitOps to enable performing operations on the application configurations through Git. It defines the state of the application and maintains the desired state through the Git sync.
With Argo CD, the deployment of the application gets automated through the Git sync in the specific and desired environments. It also tracks the version of the application configurations through the tags or branches.
Argo CD continuously monitors the state of the application as a Kubernetes controller and compares the live state of the application against the desired state. It shows OutofSync as the message if any application’s live state does not match with the desired state of the application.
To begin with, we can get started by deploying applications in sync with Argo CD using the below approaches-
- Define the manifest and configuration files in the Git Repository.
- Argo CD will then take the responsibility to sync the apps and keep checking on the status of the same for relevant actions.
With Argo CD, we can easily detect the difference in the state of the application and it also provides us with the option to sync the states automatically or manually.
Benefits of using Argo CD
- Argo CD has the capability to manage multiple Kubernetes clusters.
- It provides config management through Kustomization Helm, Jsonnet, YAML files, etc.
- Feature to rollback adhering to the configuration defined within the Git repository.
- Argo CD continuously monitors the health of the application resources deployed in the Kubernetes cluster.
- Options to sync the application for the desired state in an automated or manual manner.
- It provides us with a beautiful Web User Interface to understand the sync up better.
By this, we have approached the end of this topic. Feel free to comment below, in case you come across any questions.
For more such posts related to Kubernetes and emerging technologies, Stay tuned with us.
Till then, Happy Learning! 🙂