Deploy Helm Application with ArgoCD


Deploy Helm Application with ArgoCD

In the ever-evolving landscape of DevOps and Kubernetes orchestration, managing and deploying applications seamlessly is crucial. Helm charts have become a standard for packaging applications on Kubernetes, while ArgoCD is an innovative tool for continuous delivery of these applications. In this article, we will explore the process of deploying a Helm application using ArgoCD, offering a comprehensive guide for a smooth integration.

Setting Up the Environment:

Before diving into Helm and ArgoCD integration, make sure you have a Kubernetes cluster set up and Helm and ArgoCD installed. If you haven't installed them yet, the following commands will get you started:

# Install Helm
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

# Install ArgoCD
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

Connecting ArgoCD to Your Cluster:

Once ArgoCD is installed, we need to expose its web interface. Use the following commands:

# Expose ArgoCD's web interface
kubectl port-forward svc/argocd-server -n argocd 8080:443

Now you can access the ArgoCD web interface by navigating to http://localhost:8080 in your web browser. Log in with the default username admin and the password retrieved by:

# Get the ArgoCD admin password
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d

Deploying a Helm Application:

  1. Adding Helm Repository:

    To deploy a Helm chart using ArgoCD, you first need to add the Helm repository. Let's consider an example with the official stable repository:

    # Add Helm repository
    helm repo add stable https://charts.helm.sh/stable
  2. Creating an Application in ArgoCD:

    Now, let's create an application in ArgoCD to deploy a Helm chart. Replace <APP_NAME> and <REPO_NAME> with your desired application and repository names.

    # Create an application
    argocd app create <APP_NAME> --repo https://charts.helm.sh/stable --helm-chart <REPO_NAME>
  3. Syncing the Application:

    After creating the application, trigger a sync to deploy the Helm chart onto your Kubernetes cluster.

    # Sync the application
    argocd app sync <APP_NAME>

More Examples:

To showcase the versatility of deploying Helm applications with ArgoCD, let's explore a more complex example using a custom Helm chart from a private repository:

# Add Helm repository
helm repo add my-repo https://example.com/my-charts

# Create an application with a custom chart
argocd app create my-app --repo https://example.com/my-charts --helm-chart my-chart

So, deploying Helm applications with ArgoCD offers a powerful and efficient approach to managing your Kubernetes workloads. By following the steps outlined in this guide, you can seamlessly integrate Helm charts into your continuous delivery pipeline, ensuring a smooth and automated deployment process.

Related Searches and Questions asked:

  • Using ArgoCD CLI to Create, Sync, Delete, and Troubleshoot
  • How to Rollback Application with ArgoCD
  • How to Install Podman on CentOS 8
  • How to Install Podman on RHEL 8
  • That's it for this topic, Hope this article is useful. Thanks for Visiting us.