Kubernetes Deployment Simplified: A Guide to Using ArgoCD and Helm Together

Jakub
Jakub
Apr 23, 2024
3 min read
Kubernetes Deployment

In this article, we will explore how Argo CD and Helm charts collaborate to simplify deploying applications on Kubernetes. Argo CD functions like a conductor, ensuring all components work in harmony, while Helm charts provide pre-packaged sets of instructions for setting up applications. Together, they streamline the process, making it faster and more reliable.

Introduction

Managing the deployment lifecycle of applications within Kubernetes orchestration demands a robust and efficient approach. Various methods can make GitOps continuous delivery easier; here, we explore the synergy between ArgoCD and Helm Charts. ArgoCD is a potent continuous delivery tool designed to streamline Kubernetes app deployment. This synergy allows us to address the unique app needs and maintain uniformity in deployment, leveraging these advantages for continuous delivery within Kubernetes.

What is ArgoCD?

ArgoCD is a GitOps orchestration platform where Kubernetes app configurations are stored in Git repositories, serving as the single source of truth. ArgoCD continuously monitors these repositories to reconcile the desired app states with the actual states in the Kubernetes cluster. This declarative approach ensures consistency and facilitates easy repeatability for deploying various applications across multiple environments.

What are Helm Charts?

Helm Charts, often simply called "Helm," act as the package manager for Kubernetes. They consist of packages that define Kubernetes resources and their configurations. Helm uses templates to generate YAML manifests, allowing for parameterization and modularity in app configurations. This simplifies complex deployments, and manages dependencies, versions, and release processes. In synergy with ArgoCD, Helm provides a powerful tool to manage GitOps for continuous delivery, operability, and template uniformity across applications.

How does this synergy work?

The process is straightforward, but perfecting it takes time. Let's discuss it in five steps:

1. Chart Utilization and Definition

You either use an existing Helm chart or define your own. Many applications typically have widely used Helm charts. For example, consider a car door's manufacturing mold (matrix); during manufacturing, you specify both the standard parameters (which are consistent across all doors) and the dynamic parameters (such as color, window type, etc.) that you intend to pass to ArgoCD.

2. Value Definition:

At this step, you specify the general features like dimensions and basic paint but not specific colors or additional features like windows. Here, you can pass details like the color red, tinted glass, metallic trim, etc. This step helps you customize your uniform application template to meet specific application needs.

3. Automatic Sync and Deployment:

ArgoCD automatically checks out your Helm chart repository. When you update your application template, ArgoCD automatically propagates these changes to all applications or configurations sourced from the same repository and deploys the new version on your Kubernetes cluster. You can rollback any application version, and the old versions of the applications, like pods and other resources, are preserved until the new version passes the configured health checks.

4. Lifecycle Hooks:

Helm charts support hooks that allow custom actions during specific lifecycle events, such as pre-install, post-install, pre-delete, and post-delete. These hooks provide additional customization and automation capabilities.

5. Management via ArgoCD GUI or API:

You can manage the creation, administration, and removal of your applications through the ArgoCD web GUI or its API. The API opens up extensive possibilities for managing a large number of applications and specified versions. For instance, you can send an API request to create a new app with specific repository values and settings, and ArgoCD will handle the setup of necessary application components in Kubernetes based on these specified and customized values. Imagine a database of applications where you can easily create a new one, choose versions, enter required parameters, and have your application up and running within seconds after clicking "deploy." If you need to view logs, redeploy, or remove an application, simply click the corresponding button in your database interface.

Conclusion

In conclusion, combining the powers of ArgoCD and Helm transforms Kubernetes orchestration into an unparalleled efficient, and reliable system without significant initial time or financial investment. The only barrier for DevOps teams is the fear of the unknown. Once your team embraces this change, you can harness the full power of advanced orchestration capabilities over Kubernetes.