Create your FREE Codefresh account and start making pipelines fast. Create Account

How to Install and Upgrade Argo CD

5 min read

We have already covered several aspects of Argo CD in this blog such as best practices, cluster topologies and even application ordering, but it is always good to get back to basics and talk about installation and more importantly about maintenance.

Chances are that one of your first Argo CD installations happened with kubectl as explained in the getting started guide. While this form of installation is great for quick experimentation and for trying Argo CD, there are many more installation methods that are recommended for production deployments.

Manual installation and manual upgrade

The most obvious installation method is using the official manifests or the respective Helm chart. Note that the Helm chart for Argo CD is not official and sometimes it lags behind the regular Argo CD releases.

While the initial installation of Argo CD using just the manifests is quick and straightforward it also suffers from several shortcomings:

  • Configuration changes (e.g. SSO and notifications) must be also applied manually without any option for rollbacks or auditing
  • No disaster recovery option if your Argo CD instance goes down
  • Extra effort is needed for modifications on the base install (e.g. for Argo CD plugins)
  • It becomes very cumbersome to manage multiple Argo CD instances in a manual way

However, the biggest challenge is actually upgrading Argo CD in a safe way. New Argo CD versions come with their own notes and incompatibilities and trying to manually upgrade your instance without any backup plan is a recipe for disaster.

In summary, you should only employ manual installation via manifests for quick prototypes and demo installations.

Using a hosted Argo CD instance

If you are searching for the easiest way to use Argo CD while still having a production installation, look no further than a hosted Argo CD instance. At Codefresh, we already announced our hosted Argo CD offering earlier this year. This Argo CD instance is completely managed by Codefresh personnel. The only thing you need to do is connect your cluster for deploying your applications.

The main advantage of this method is that all maintenance effort is handled by Codefresh and not you. All version updates, security fixes and other upgrades are automatically handled behind the scenes by Codefresh and you can focus on deploying applications.

Hosted GitOps
Hosted GitOps

The hosted version of Argo is available to everyone that signs-up with Codefresh, including free accounts.

Using Argo CD to manage Argo CD

Using a hosted instance of Argo CD can be great for many organizations, but may not be a fit if you need to deploy behind the firewall, or need more customization. Ideally you would like to customize your Argo CD installation, setup different settings, configure your own plugins, pin down specific Argo CD versions etc

Hosting your own Argo CD instance is popular, but instead of doing it manually you should use a management platform on top of it. And the most obvious choice would be managing Argo CD with itself!

This use case is perfectly valid and a lot of organizations use self-managed Argo CD. The advantages are:

  • Using GitOps to handle not just applications but also the Argo CD installation
  • Full audit via Git
  • Easy rollbacks
  • Automatic drift detection for any manual changes
  • Complete changelog of all configuration changes (e.g. notifications SSO)
  • Easy disaster recovery

This is a great way to handle a production instance of Argo CD. Depending on the size of your organization it will still suffer however from some important challenges

  1. You still have to perform manual upgrades and make sure that each new version of Argo CD “sits” cleanly on top of the previous one
  2. Handling a large number of Argo CD installations and keeping them all in sync (pun intended) is still a big challenge.

Using Argo CD Autopilot

The use case for using Argo CD to manage Argo CD is very popular as a concept but there are no best practices yet on how to get started and how to bootstrap the whole environment.

We use the same approach internally and we fully open-sourced our solution at https://argocd-autopilot.readthedocs.io/en/stable/

Argo CD autopilot provides a CLI installing and managing Argo CD that does the following:

  1. Connects to your Git provider
  2. Bootstraps Git repositories for handling both applications and itself
  3. Setup Applications and ApplicationSet for auto-upgrading itself and other managed apps
  4. Provides a best practice Git repo structure for both internal and external applications
  5. Comes with a CLI that allows you to manage and maintain the installation
  6. Introduces the concepts of deployment environments/projects

Argo CD Autopilot is under active development. You are welcome to participate in Github as well as the #argo-cd-autopilot channel in the CNCF slack.

Using a control plane

Handling one or two Argo CD instances is pretty straightforward if you choose any of the above installation methods. Several organizations however have a large number Argo CD instances that need to be kept in sync or rolled gradually as new versions come out.

Argo CD can natively support a management instance that handles multiple deployment clusters. So in theory you could have a single Argo CD instance for all your environments. We have already talked about this pattern in our article about scaling Argo. In the end, having a single instance is a single point of failure and also comes with its own issues for security and redundancy.

On the other hand having an Argo CD instance for each deployment cluster is also excessive and can lead to a cumbersome setup where maintaining Argo CD instances becomes tedious and unmanageable, especially across virtual private clouds and firewalls.

Ideally you would like a single management interface that can handle all possible combinations (Argo CD management cluster and deployment clusters) allowing you to craft your perfect topology.

This management interface exists in the form of the Codefresh GitOps control plane!

Argo CD multi cluster management
Argo CD multi cluster management

The Codefresh platform gives you a unified interface for handling all Argo CD instances no matter where they are located. All possible configurations are supported:

  • Argo CD management clusters
  • Argo CD deployment clusters
  • Hosted Argo CD installations
  • Deployment clusters managed by the hosted instance
  • Argo CD instances that deploy on the same cluster they are installed on
  • Argo CD instances that are deployed behind a firewall or on-premise environment

Via the control plane interface you can then

  1. Connect Argo CD instances
  2. Connect target deployment clusters
  3. See the status of each Argo CD instance and each connected cluster
  4. Upgrade Argo CD instances on a new version in a controlled manner
  5. Keep track of versions/security alerts, and easily upgrade

The unified control plane is the perfect tool for all organizations that need a management interface on top of all their Argo CD instances without all the hassle for manual upgrades.

Summary

In this blog post we have seen most Argo CD installation methods from the simplest one (just the manifests) to the most powerful one (the unified control plane). Depending on the size and complexity of your organization you should choose a management method that allows you to focus on the things that matter most – deploying applications, instead of handling the instances themselves

For more information on the hosted instance and the control plane sign-up with Codefresh. See also our best practices article and getting started guides. And of course, don’t forget to get GitOps with Argo CD Certified!

Kostis Kapelonis

Kostis is a software engineer/technical-writer dual class character. He lives and breathes automation, good testing practices and stress-free deployments with GitOps.

Leave a Reply

* All fields are required. Your email address will not be published.