November 4, 2024

Anjelica Ambrosio

Anjelica Ambrosio

Deployment Made Easy with Argo CD: Argo CD for Beginners

Face it: Kubernetes is powerful and can do so much, but is highly complex (and frustrating) to work with. Due to this inherent complexity, Kubernetes presents significant challenges in terms of setup and configuration. There's no user interface to visualize what's happening or to aid in issue triage, and the tool requires deep knowledge that may be a challenge for first time users. Most guides on Kubernetes make the assumption you already know concepts such as microservices-based architecture, cloud-native technologies, containers, networking, continuous delivery (CD) and continuous integration (CI) practices, infrastructure as code, etc. To anyone just starting out, this can be discouraging. But fear not!

To combat these challenges, Intuit developed tools not only to accelerate adoption of Kubernetes, but also improve the user experience. 

Rooted in GitOps, Argo CD simplifies the process of managing and deploying applications with Kubernetes. For example, Argo CD solves Kubernetes' graphic-less user interface issue by providing comprehensible visuals and status reports on your application. 

But that's not all Argo CD has to offer. Read on and see why Argo CD will be your best friend for adopting Kubernetes in your organization.

Breaking Down Argo CD

In Greek mythology, the Argo was the ship of Jason and a band of heroes aptly named the Argonauts. Throughout their journey, they encountered many dangers and trials, yet the Argo weathered the storm and came out on top. Like its namesake, Argo CD is your trusty companion that can help you weather the trials and tribulations you may face while working with Kubernetes. 

Argo CD is a declarative GitOps-aligned continuous delivery tool for Kubernetes designed to be visually oriented and user-focused. 

What Does It Mean to Be "Declarative"? 

Recall that Argo CD is based on GitOps, which follows the GitOps principles. Let’s examine the first principle: "A system managed by GitOps must have its desired state expressed declaratively.

“Declaring” is announcing or asserting with certainty, and that's exactly what we'll do. With GitOps, the desired state is the one source of truth. We need to declare what this source of truth is. We can do this using a Kubernetes manifest represented by YAML (fun fact, YAML stands for Yet Another Markup Language!) file, Helm Chart, etc. I used a YAML file as an example below:

This YAML file is a blueprint for the system to follow. I've annotated the code with comments on what each field means. From this file alone, we can tell: what API (Application Programming Interface) version we intend to use, what Kubernetes resource we intend to use, how many replicas we want to run, what containers run in the pod, etc. Each line is a declaration to the system on achieving our desired state. The system will go ahead and deploy with these specifications in mind.

The same applies to Argo CD! Argo CD applications, projects, and settings can be defined declaratively using a Kubernetes manifest, like a YAML. 

Argo CD is a Kubernetes controller that monitors your running applications constantly. Argo CD follows the first principle: If the system state and the desired state are out of sync, Argo will automatically reconcile or fix the system state to match the desired state. 

Want to learn more about GitOps? Check out my guide: Getting into GitOps: GitOps Made Simple.

What is Continuous Delivery?

Argo CD is a Continuous Delivery tool. Continuous Delivery, as the name suggests, is a continuing delivery of code changes to production in a safe, sustainable way. Continuous Delivery is an extension of Continuous Integration. As you would guess, Continuous Integration integrates code changes into the main branch (like a Git repository).

Continuous Delivery allows developers to push code changes to production servers without having to go into the infrastructure. GitOps is a mechanism that pulls the latest code and application configuration from sources such as Git and deploys it to Kubernetes resources.

What Issues Can Continuous Delivery Solve?

Continuous Delivery automates the otherwise error-prone process of releasing code into a production environment. Continuous Delivery aims to make deployments painless, safe events that can be conducted at any time, on demand. This "codifies" the release process and gives better visibility and insight into concerns like constraints to developer productivity. How? The steps required to go from a build to running in production are defined, laid out, and made accessible. This saves developers time from the toil of manually creating and deploying multiple releases. Time is money, as they say. With the time you save, you can focus on more important things, such as ensuring the best quality of your product!

Safer Deployments!

The primary goal of Continuous Delivery is to make deploying software painless, low-risk, and able to be performed at any time, on demand.

Continuous Delivery is not just an excellent way to save yourself money/time, but it is generally safe, using patterns such as blue-green deployments. A blue-green deployment is a software release strategy in which two identical environments are created to run different versions of the same application. Typically, only one environment is live (blue), but the other (green) is idle. If something goes wrong with blue, then green takes blue's place. Think of it like an understudy or a back-up plan. Once green takes blue's place, a brand new green environment is created. Now, your back-up plan has a back-up plan. 

So, How Does Argo CD Work?

Argo CD is implemented as a Kubernetes controller. A Kubernetes controller is a control loop that continuously monitors applications running in the cluster and compares their current system state with the desired state. Think of Argo as a "cluster monitor" that ensures both the system state and desired state are in sync. When an application deployed within a Kubernetes cluster contradicts its desired state, it is considered out of sync. Argo CD reports these differences and can either automatically make the changes to match the desired state or alert an administrator to make the changes manually. 

The Components of Argo CD

There are several main components of Argo CD:

API (Application Programming Interface) Server: This server exposes the API used by Argo CD's user interface, command line interface (CLI), and CI/CD systems. Argo's API server is responsible for application management, managing credentials, authentication, status reports, etc.

  1. Repository Server: The Repository server takes a snapshot of the git repository where the manifests are stored. This ensures that Argo always has access to the manifests with the declarations for the desired state. 

  2. Application Controller: Remember, Argo CD is implemented as a Kubernetes controller. This controller keeps an eye on the running applications and makes sure the system state matches the desired state. 

  3. Application Set: The controller that automates Argo CD application management.

  4. Image Updater: The controller that monitors Docker registries and automatically updates docker image tags in git repositories.

  5. Dex: Dex is used to delegate authentication to external identity providers like GitHub.

Neat Tidbit: With the unique agent-based architecture for Argo CD provided by the Akuity Platform, the location of the Application Set, Repository Server, and Image Updater components are configurable.

Why would you want to move these components? It really depends on your use case. Some organizations choose to run their repository server in each cluster, which puts it in close proximity to managed workloads. Other organizations might prefer tighter control over their Git repository, so they'll run the repository server in a dedicated cluster with Git access.

Other Argo CD Features

Argo CD boasts other features such as: 

  • SSO Support: Single Sign-On for easy access to applications with just ONE set of credentials.

  • WebHook integrations: A way to automatically send data between applications using an HTTP (Hypertext Transfer Protocol) request.

  • Easy rollbacks: Restore an application to a previous version. 

  • Template Tools Integration: Integrated with configuration/templating tools such as Kustomize, Helm, and YAML. 

Argo CD and Akuity Platform: Better Together

Argo CD is a fantastic tool on its own, and the Akuity Platform enhances and extends Argo's CD capabilities, saving time and improving security. Argo CD operates in a hub-and-spoke model, and any scaling is usually done by running multiple control planes. The Akuity Platform uses one control plane but offers the same scale as running multiple Argo CD instances. 

How is this accomplished? By separating Argo CD's data plane from the control plane, this allows us to get the best of both worlds.

The Akuity Platform hosts and manages Argo CD's front end, the control plane, which enables developers to manage the desired state of their applications and gain insight into the state of managed infrastructure. 

The Argo CD application controller runs inside the managed clusters and seamlessly connects back to the control plane by the Akuity Agent.

Why would you want only one control plane? This allows the move of the most critical Argo CD component closer to the infrastructure it manages. Plus, it's generally easy to maintain just one control plane as opposed to multiple. It can provide benefits such as improved security, as the Argo CD controller runs inside the managed cluster, so no external cluster access is needed.

No external cluster access = no cluster credentials needed! Admins no longer need to store and maintain cluster credentials. 

That's not all; by separating the two planes, we can achieve higher scalability by allowing the controller's tasks to be distributed to individual clusters. 

Who doesn't love saving money? This unique architecture also can reduce networking costs. Since our controller runs inside the managed cluster, Kubernetes resource processing will happen inside the cluster instead of over a network. Only the most relevant metadata is presented in Argo's UI and sent over the network. This can reduce traffic consumption by as much as 80%.

Akuity Platform's hybrid architecture increases security, extends Argo CD's capabilities, and makes Kubernetes deployments easier to manage with only one control plane for multiple clusters.

Check out our blog post, Argo CD Architectures Explained, for a full in-depth list of pros and cons of a single control plane.

Try it Out!

The Akuity Platform is easy to test out, so why not try today? Sign up for a 30-day free trial for the Akuity Platform, and you'll have a fully managed Argo CD instance in minutes!

Is this your first time working with Argo CD? We have a few tutorials here to help you get started.

Want to learn even more about Argo CD? Read Argo CD's documentation here.

Help and Support

If you'd like to learn more about the amazing features Akuity Platform offers, you can schedule a technical demo with our team or check out our "Getting Started" manual.

If you have any questions, be sure to check out our community Discord.

Get Started

Try Akuity Platform free for 30 days.
No credit card required.

Man and woman throwing ball between themselves

Get Started

Try Akuity Platform free for 30 days.
No credit card required.

Man and woman throwing ball between themselves

Get Started

Try Akuity Platform free for 30 days.
No credit card required.

Man and woman throwing ball between themselves