ArgoCD is a Kubernetes-native continuous deployment (CD) tool. Unlike other CD tools that only enable push-based deployments, ArgoCD can pull updated code from Git repositories and deploy it directly to Kubernetes resources. It allows DevOps to manage infrastructure configuration and application updates in one system. Argo enables teams to implement a GitOps approach for their CI/CD pipelines in Kubernetes – it allows teams to build entire pipelines using simple declarative configuration.
Residing within the Kubernetes cluster as an operator, it watches a remote Git repository for new or updated Manifest files and synchronizes those changes with the cluster. By managing Manifests in Git and syncing them with the cluster, you get all of the advantages of a Git-based workflow, such as version control, transparency in collaboration, pull-request reviews, and many others. It also provides a one-to-one mapping between what is in the Git repo and what is deployed in the cluster. This method is called GitOps. And top of it, it comes with an interactive graphical user interface allowing developers to track and monitor all changes in a clean and simplified way.
Image Source: GitOps
This continuous delivery tool or operator, or agent works on GitOps principles. Let’s look at ArgoCD more deeply and its key advantages to deployment teams.
Single Source Of Truth
Unlike Jenkins or CircleCI, ArgoCD allows you to figure out exactly what is running in the cluster by looking at the git repository. ArgoCD works as a Kubernetes extension and offers benefits like visibility in the cluster and real-time updates of application state like pods created and checks of its state whether healthy or not.
ArgoCD has a convenient web-based UI that simplifies working with the tool. For example, you do the same thing, like define an application and ask ArgoCD to create the relevant YAML configurations. Additionally, it lets you visualize the resulting Kubernetes configuration in terms of pods and containers. It is one of the things highly liked among DevOps as it made creating the declarative configuration easier.
Faster Update Directly In Cluster
ArgoCD does watch not only the changes in Git Repository but also the changes in the cluster. Any time a change happens in the git repository or cluster, it compares the actual state with the desired state. ArgoCD compares the desired configuration in the Git repo with the actual state in the K8S cluster. Unlike other tools where kubectl changes are untrackable, ArgoCD provides a single interface, version-controlled changes, and a history of changes of what and who made changes in the cluster. It further offers better team collaboration.
Easy Roll Back
ArgoCD pulls any changes and applies that to the cluster. If something breaks or a new application version fails to start, you can reverse to the previous working state in the git history. Managing thousands of clusters manually could be challenging. But with ArgoCD, you don’t have to revert manually to every component, doing kubectl delete, uninstall, or basically store and clean up everything. You can simply declare the previous working state, and the cluster will be synched to that state again. ArgoCD works on the declarative model (declare your desired end state).
Read more about different Kubernetes deployment strategies
Cluster Disaster Recovery
GitOps principles state that your entire system (including cluster specifications, components, and workloads) is described declaratively and versioned in Git. Following the GitOps principles, ArgoCD offers super easy cluster disaster recovery. For example, if you have an EKS cluster in region 1-a and if this cluster completely crashes, ArgoCD can create a new cluster – point it to the git repository where the complete cluster configuration is defined. It will recreate the same state as the previous one without any intervention from your side.
ArgoCD is a relatively lightweight and highly secure approach to K8s deployments. This continuous delivery tool pulls changes from a remote Git repo. Therefore, you don’t need to define firewall rules and VPC peering connections to get deployment servers to connect with the cluster, which is one less entry point. It significantly reduces the attack surface area for dev/QA/prod servers.
ArgoCD is required to manage potentially hundreds of Kubernetes clusters, retrieve manifests from thousands of Git repositories, and present results to thousands of users. It might look like a highly complicated situation. The best part is that ArgoCD can scale well out of the box. ArgoCD is optimized to run on top of Kubernetes, enabling users to fully utilize Kubernetes’ scalability.
ArgoCD strongly supports multiple teams working on different projects in the same Kubernetes environment. It is possible to restrict ArgoCD CRDs to only read source repositories that belong to a certain project. Moreover, it can be set to deploy applications to a specific cluster and namespace. ArgoCD CRD instances can also have role-based access control (RBAC) settings.
Leverages Existing Tools
Organizations use several other declarative configuration tools based on YAML, Helm charts, Kustomize, or other systems. ArgoCD leverages all these tools organizations have invested in rather than replacing them. With ArgoCD, you can use any format to automatically create the relevant CRD definitions.
Monitoring and Alerting
The Argo Rollouts controller is already instrumented with Prometheus metrics. For example, application reconciliation performance, the controller queue depth, and the number of application sync operations in history counts. You can use these metrics to look at the controller’s health via dashboards or other Prometheus integrations. You can also visualize the metrics from the controller using Grafana dashboards.
Kubernetes requires so many layers of abstraction; hence it’s important to ensure that your deployments are as maintainable as possible. The GitOps philosophy is a good solution to that problem, and ArgoCD is the best tool for lifecycle management. Applying git repository configurations to Kubernetes, ArgoCD also helps accelerate the deployment of cloud-native applications.
If you are struggling with your Kubernetes deployment or not sure whether the deployed CI/CD tools support your vision of automation, you should discuss questions with Kubernetes Consulting Partner. Get the comprehensive consulting, training and round the clock support for your modern application deployment.