Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. OR
At its very simplest, It monitors your cluster and your declaratively-defined infrastructure stored in a Git repository and resolves differences between the two — effectively automating an application deployment.
Without Argo CD, GitOps remains “ClickOps.” Your CI/CD tool may be able to roll out infrastructure changes, but it can’t monitor diffs, and thus infrastructure remains mostly manual.
GitOps is a Git-centric framework for application deployment that greatly simplifies software development in cloud-native environments.
It uses DevOps best practices, such as version control and CI/CD, and applies them to infrastructure automation.
As a GitOps continuous delivery tool, Argo CD continuously monitors your running infrastructure (the actual state) to compare it to declaratively-defined code (the desired state or target state) to determine whether they are out of sync, which helps to remediate configuration drift.
Argo CD automatically deploys new configurations and new version code to the target environment. Depending on how you’ve configured Argo CD to work, it’ll either notify you that things are out of sync after a new git commit, or take action. If you’ve set it up to automatically enforce changes, it’ll overwrite the production configuration with what’s stored in your immutable, versioned Git repository. The tool is great for complex application rollouts.
Furthermore, Argo CD is essential when your developer team is working in version-controlled environments. By automating lifecycle management and application deployment, Argo CD proactively monitors your application configuration for any potential syncing issues before it reaches your production environment.
To set up and begin using Argo CD and Kubernetes, you’ll need a working familiarity with:
- Containers, virtual machines, and probably, the containerization tool Docker
- A container orchestration system like Kubernetes (though there are alternatives)
- (Possibly) Managing Kubernetes clusters and manifests in YAML, Helm Charts, or Kustomize
Argo CD offers the actual monitoring and syncing between the Git-defined infrastructure and your container orchestration tools. It has five primary components:
Within the web UI, you can create applications, though advanced folks interested in automation will want more control and will do this declaratively in Git. You can also manage connected Git repositories, certificates for access to those repositories, your clusters, and projects directly in the web UI. (Projects let you structure your applications to create useful silos around each team’s work.)
One of the more useful components of the Argo CD interface is you can view a visual pipeline of your infrastructure deployments, and your various applications’ services and clusters. If an application is in a crash loop, this lets you see all the events, as well as the manifest and configuration values, so you can visualize deployment issues and debug. (It will also hide your secrets.)
Users need not touch the Argocd login page because you can either manage Argo CD through APIs or create YAML resource definitions (or use Kustomize or Helm Charts to help manage Kubernetes resources). Once set up, developers don’t need to understand all the intricacies of the infrastructure they’re deploying. They just need the application definitions to include in their pull requests or merge requests.
Argo CD creates its own namespace within your Kubernetes (or similar) cluster (kubectl create namespace argocd). There, it stores the Argo CD CRDs.
Argo CD caches your Git repo locally and stores application manifest files.
Once you download the Argo CD application controller onto your repository server, it can invoke hooks defined by software development lifecycle events. (E.g. PreSync, Sync, PostSync.)