Installing Argo CD on Kubernetes: A Terraform and Helm Approach
Argo CD, a leading GitOps tool, is designed to keep Kubernetes clusters synchronized with a desired state defined in a Git repository. While a direct `helm install` command suffices for local testing, a recent article emphasizes the benefits of integrating Terraform for more robust and scalable deployments in shared environments.
The guide outlines a comprehensive approach where Terraform manages the installation process, leveraging the Helm provider to deploy the official Argo CD chart. This method brings several key advantages, including the ability to version-control the entire installation, making all changes visible and auditable through `terraform plan` outputs.
Furthermore, using Terraform allows for the easy reuse of the same Argo CD configuration across different Kubernetes clusters, promoting standardization and reducing configuration drift. It also enables CI/CD systems to apply configurations reliably without relying on a local `kubeconfig` file. The article details how to manage Helm values alongside other infrastructure definitions, providing a unified approach to infrastructure as code.
The proposed Terraform module connects to an existing Kubernetes cluster, creates the necessary `argocd` namespace, and then installs Argo CD. It also covers optional configurations such as exposing Argo CD through ingress and passing custom Helm values via a generic map, which are then merged with base values for flexible customization. This ensures that while common settings are easily configurable, advanced options remain accessible directly through the Helm chart.
Read original source