ARGO CD: Declarative GitOps CD for Kubernetes
Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. Once we store the desired state in Git, we must allow any changes to the state to be applied automatically. Argo CD pulls the desired state declaration from the source and deploys it directly to Kubernetes resources.
What is GitOps?
GitOps is an operational framework based on DevOps practices, like CI/CD and version control, that automates infrastructure and manages software deployment. It's a framework where the entire code delivery process is controlled via Git.
The basic idea of GitOps is to place a Git repository at the center of your infrastructure declarations and use it to manage the current state and history of your application infrastructure.
Argo CD continuously monitors running applications and compares their live state to the desired state. It reports deviations and provides visualization to help developers manually or automatically sync the live state with the desired state.
How does Argo CD work?
It follows the GitOps pattern by using Git repository as a single source of truth for the desired state of application and the target deployment environments.
It automates the synchronization of the desired application state with each of the specified target environments.
Argo CD is implemented as a Kubernetes controller which continuously monitors running applications and compares the current, live state against desired state. If the desired state deviates from the live state then the application is considered OutofSync.
Argo CD also reports and visualizes the differences, providing facilities to automatically or manually sync the live state back to the desired state.
Concepts and Terminology
Argo CD Architecture Flow
There are four logical layers represented in the diagram:
API Server:
The API server is a gRPC/REST server that exposes the API consumed by the UI layer.
Recommended by LinkedIn
Repository Server:
This service maintains a local cache of the Git repo. of application manifests. It is responsible for interacting with the Git repo. to generate the desired state of all Kubernetes resources that belong to a given application.
Application Controller:
The application controller is a Kubernetes controller which continuously monitors the running applications and compares the current, live state against the desired state. It detects OutofSync application state and optionally takes corrective action.
Kube API:
Argo CD controllers will connect to the Kubernetes API to run the reconciliation loop.
Dex:
It's a lightweight server that provides Argo CD authentication with external OIDC providers.
Argo CD Hands-On:
For practicing Argo CD one can use the following git repository:
Once you install the Argo CD in your cluster you can get some hands-on by using the examples provided in the repository owned by Argo CD project.
Above images shows guestbook app deployed on Argo CD.
Resources:
iOS Developer (Swift/SwiftUI) & Flutter Expert | Building High-Performance Apps | Businessnext
7moVery informative