Bootstrapping ArgoCD with Helm and Helmfile
ArgoCD is a powerful tool for managing GitOps workflows in Kubernetes. Combining it with Helm and Helmfile streamlines the setup process, enabling version-controlled configurations and better automation.
In this article, we’ll walk through setting up ArgoCD using Helm and managing it with Helmfile for an efficient and maintainable deployment process.
Why Use Helm and Helmfile for ArgoCD?
- Helm simplifies application packaging and deployment in Kubernetes.
- Helmfile extends Helm by managing multiple Helm charts and their configurations declaratively.
- Combining Helmfile and Helm for ArgoCD ensures consistent and reproducible setups, especially in environments with multiple clusters or teams.
Prerequisites
Before starting, ensure the following are in place:
A Kubernetes cluster.
Helm installed (helm version).
Helmfile installed (helmfile version).
A Git repository to store your Helmfile and values files.
Step 1: Add the ArgoCD Helm Repository
First, add the official ArgoCD Helm repository:
helm repo add argo https://argoproj.github.io/argo-helm
helm repo update
Step 2: Create a helmfile.yaml
Create a helmfile.yaml to manage the ArgoCD Helm chart. Here’s a basic example:
repositories:
- name: argo
url: https://argoproj.github.io/argo-helm
releases:
- name: argocd
namespace: argocd
createNamespace: true
chart: argo/argo-cd
version: ~5.46.0 # Specify the desired version
values:
- values/argocd-values.yaml
Step 3: Define Values for ArgoCD
In the values/argocd-values.yaml file, customize the ArgoCD configuration. Example:
argo-cd:
dex:
enabled: false
notifications:
enabled: false
applicationSet:
enabled: false
server:
extraArgs:
- --insecure
Adjust these values based on your environment, such as enabling ingress or setting up replicas for HA.
Step 4: Deploy ArgoCD with Helmfile
Run the following command to deploy ArgoCD:
helmfile apply
This will:
Create the argocd
namespace (if not already existing).
Install or upgrade the ArgoCD Helm chart using the specified values.
Step 5: Verify the Installation
Check the status of the deployment:
kubectl get pods -n argocd
Access the ArgoCD UI (replace LoadBalancer or ingress domain accordingly):
kubectl port-forward svc/argocd-server -n argocd 8080:443
The default username is admin, and the password can be fetched using:
kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath="{.data.password}" | base64 -d
Step 6: Manage Configuration with GitOps
Now that ArgoCD is set up, you can manage your Kubernetes applications declaratively using Git repositories.
Advantages of Using Helmfile for ArgoCD
- Centralized Configurations: All charts and values are in one file, making it easy to track changes.
- Reproducibility: Deployments are consistent across environments.
- Multi-environment Support: Define multiple environments (e.g., dev, staging, production) in a single Helmfile.
Final Thoughts
Bootstrapping ArgoCD with Helm and Helmfile is a powerful way to simplify and streamline GitOps workflows. With the declarative nature of Helmfile, you can easily manage and version-control your ArgoCD setup, ensuring smooth operations across your Kubernetes clusters.
Feel free to extend this setup further by incorporating secrets management tools, custom plugins, or CI/CD pipelines for automated deployments.
Did you find this guide helpful? Share your thoughts or tips for improving the ArgoCD setup using Helm and Helmfile in the comments!
Woovi is a fintech platform revolutionizing how businesses and developers handle payments in Brazil. Built with a developer-first mindset, Woovi simplifies integration with instant payment methods like Pix, enabling companies to receive payments seamlessly and automate financial workflows.
If you want to work with us, we are hiring!
Top comments (0)