> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy Apps using HELM Chart

> Using Argo CD to deploy and manage Helm charts for GitOps style declarative application delivery, including creating apps from Git or Helm repos and managing via CLI or UI.

In this lesson you'll learn how to deploy Helm charts with Argo CD and how Argo CD integrates with Helm to implement GitOps-style, declarative application delivery.

Helm is the Kubernetes package manager that packages applications as charts and defines them declaratively — a core principle of GitOps. Argo CD can deploy and continuously monitor Helm charts from several sources, including:

* a Git repository where the chart lives under a specific repo path, or
* a Helm chart repository (public or private), such as Bitnami or Artifactory.

For full reference:

* [Argo CD](https://argo-cd.readthedocs.io/)
* [Helm](https://helm.sh/)
* [Helm chart repository concept](https://helm.sh/docs/topics/chart_repository/)

## Typical Helm chart layout

A simple Helm chart directory looks like this:

```text theme={null}
─ helm-chart
  ├─ Chart.yaml
  ├─ templates
  │  ├─ NOTES.txt
  │  ├─ _helpers.tpl
  │  ├─ configmap.yaml
  │  ├─ deployment.yaml
  │  └─ service.yaml
  └─ values.yaml
```

What these files do:

| File / Folder           | Purpose                                                        |
| ----------------------- | -------------------------------------------------------------- |
| Chart.yaml              | Chart metadata (name, version, app version, description)       |
| templates/              | Kubernetes manifest templates rendered with values and helpers |
| templates/NOTES.txt     | Post-installation notes shown by helm CLI                      |
| templates/\_helpers.tpl | Helper template functions used by other templates              |
| values.yaml             | Default configuration values (can be overridden by Argo CD)    |

## How Argo CD consumes Helm charts

Argo CD treats Helm as a manifest generator: it renders chart templates (using provided values) and applies the generated Kubernetes manifests to the target cluster. You can reference Helm charts from:

* Git repository (chart files inside a repo path)
* Helm chart repository (using chart name and optional revision)

Below are step-by-step examples for both approaches.

## Create an Argo CD application from a Git repository

Steps:

1. Point Argo CD at the Git repository URL.
2. Set the repo path that contains the chart.
3. Optionally override chart values using `--helm-set` or a values file.

Example: create an application named `random-shapes` from the repo path `helm-chart`, overriding a few values:

```bash theme={null}
argocd app create random-shapes \
  --repo https://github.com/sidd-harth/test-cd.git \
  --path helm-chart \
  --helm-set replicaCount=2 \
  --helm-set color.circle=pink \
  --helm-set color.square=violet \
  --helm-set service.type=NodePort \
  --dest-namespace default \
  --dest-server https://kubernetes.default.svc
```

Expected CLI response:

```text theme={null}
application 'random-shapes' created
```

## Create an Argo CD application from a Helm chart repository

Steps:

1. Add the Helm chart repository to Argo CD (use `--type helm` for Helm repos).
2. Create an application referencing the chart name in that repo; optionally specify a chart revision and a values file.

Example: add the Bitnami chart repository to Argo CD, then create an application from the `nginx` chart at a specific revision:

```bash theme={null}
# Add the chart repository to Argo CD (if not already added)
argocd repo add https://charts.bitnami.com/bitnami --type helm

# Create an application using the nginx chart from that repo
argocd app create nginx \
  --repo https://charts.bitnami.com/bitnami \
  --helm-chart nginx \
  --revision 12.0.3 \
  --values values.yaml \
  --dest-namespace default \
  --dest-server https://kubernetes.default.svc
```

## Manage deployments via the Argo CD UI

* The Argo CD web UI provides forms to create and manage applications, including Helm chart options and value overrides.
* UI supports repository connections using SSH, HTTPS, and GitHub App authentication.
* Whether created via CLI or UI, Argo CD continuously monitors the desired state in Git (or the chart repo) and reconciles changes to the cluster.

<Callout icon="lightbulb" color="#1CB2FE">
  Once Argo CD deploys and manages a Helm chart, Argo CD becomes the source of truth for that application's lifecycle. Use the Argo CD CLI or the UI to inspect, sync, and manage the application state rather than local Helm client commands.
</Callout>

## Important: Helm CLI vs Argo CD-managed apps

When Argo CD deploys Helm charts, Argo CD renders the manifests and applies them to the cluster using its reconciliation engine. Argo CD does not create Helm release records in cluster storage the way a local Helm CLI install does. As a result:

* `helm list` typically will not show applications managed by Argo CD.
* Use Argo CD commands and the Argo CD UI for authoritative application metadata and status.

To inspect an Argo CD-managed application:

```bash theme={null}
# See Argo CD-managed application metadata and status
argocd app get random-shapes
```

Example: `helm ls` output may be empty for Argo CD-managed apps:

```text theme={null}
$ helm ls

NAME    NAMESPACE   REVISION    UPDATED STATUS  CHART   APP VERSION
```

<Callout icon="warning" color="#FF6B6B">
  Do not rely on `helm list` to determine the state of applications managed by Argo CD. Always use `argocd app get` or the Argo CD UI for authoritative application status and metadata.
</Callout>

## Quick reference — Argo CD + Helm

| Source Type           | How to reference in Argo CD                                                             | Example                                                          |
| --------------------- | --------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| Git repository        | Use `--repo` and `--path` to point at chart directory inside the repo                   | `argocd app create myapp --repo https://... --path helm-chart`   |
| Helm chart repository | Add the repo with `argocd repo add --type helm` and use `--helm-chart` (+ `--revision`) | `argocd repo add https://charts.bitnami.com/bitnami --type helm` |

## Links and references

* [Argo CD Documentation](https://argo-cd.readthedocs.io/)
* [Helm Documentation](https://helm.sh/)
* [Helm chart repositories](https://helm.sh/docs/topics/chart_repository/)
* [Bitnami Charts](https://charts.bitnami.com/bitnami)

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/certified-argo-project-associate-capa/module/9facbd04-7a3f-4200-9d6e-53936e93d875/lesson/d6e2a380-2f64-465c-ab84-97ae6a8cf39e" />
</CardGroup>
