> ## 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.

# Demo Helm

> Explains using Helm charts with values.yaml and Argo CD to manage Kubernetes deployments via GitOps, enabling templated manifests, versioned configuration, and automated cluster reconciliation

[Helm](https://learn.kodekloud.com/user/courses/helm-for-beginners) is the de facto package manager for Kubernetes. Helm charts combine reusable templates and environment-specific `values.yaml` files to generate Kubernetes manifests (Deployments, Services, RBAC, HPAs, etc.), which makes deployments consistent and repeatable across environments.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/GVEyjNcGG4U_6mB_/images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/git-repo-web-interface-helm-charts.jpg?fit=max&auto=format&n=GVEyjNcGG4U_6mB_&q=85&s=023e46572be22cf36cb09fdeae630cf5" alt="The image shows a web interface for a Git repository hosted on a local server, displaying a directory structure of a project related to Helm charts with several YAML and TPL files listed." width="1920" height="1080" data-path="images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/git-repo-web-interface-helm-charts.jpg" />
</Frame>

## Helm chart anatomy (quick reference)

| File / Directory |                                         Purpose | Example                     |
| ---------------- | ----------------------------------------------: | --------------------------- |
| `Chart.yaml`     |      Chart metadata (name, version, appVersion) | `Chart.yaml`                |
| `values.yaml`    |     Default configuration consumed by templates | `values.yaml`               |
| `templates/`     | Resource templates rendered with Helm functions | `templates/deployment.yaml` |
| `charts/`        |                   Subcharts (dependency charts) | `charts/`                   |

Templates are YAML manifests with Helm template expressions that evaluate at render time. For example, a Deployment template in `templates/deployment.yaml` may look like:

```yaml theme={null}
apiVersion: apps/v1
kind: Deployment
metadata:
  name: highway-animation
  labels:
    app: highway-animation
spec:
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels:
      app: highway-animation
  template:
    metadata:
      labels:
        app: highway-animation
    spec:
      containers:
        - name: highway-animation
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          ports:
            - containerPort: {{ .Values.containerPort }}
              protocol: TCP
          env:
            # You can render environment variables from .Values.env (list)
            # e.g., {{- toYaml .Values.env | nindent 12 }}
```

Note: Template expressions such as `{{ .Values.replicaCount }}` are shown inside code blocks to avoid MDX parsing issues.

A matching `values.yaml` supplies defaults consumed by the template. A minimal example for this chart:

```yaml theme={null}
replicaCount: 1

image:
  repository: siddharth67/highway-animation
  pullPolicy: IfNotPresent
  tag: "blue"

service:
  type: NodePort
  port: 3000
  targetPort: 3000

containerPort: 3000

env:
  - name: POD_COUNT
    value: "1"

# Optional resource configuration:
# resources:
#   limits:
#     cpu: 100m
#     memory: 128Mi
#   requests:
#     cpu: 100m
#     memory: 128Mi
```

Using templates + `values.yaml` enables you to:

* Reuse the same chart across environments (dev/staging/prod) by swapping values.
* Maintain a single source of truth for manifests while customizing behavior with values or overrides.
* Keep configuration in Git to satisfy GitOps principles and enable auditability.

Because the chart lives in a Git repository, it aligns with GitOps best practices. Continuous delivery tools like [Argo CD](https://learn.kodekloud.com/user/courses/gitops-with-argocd) or [Flux CD](https://learn.kodekloud.com/user/courses/gitops-with-fluxcd) can render the chart and continuously reconcile the cluster to the desired state.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/GVEyjNcGG4U_6mB_/images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/argo-cd-dashboard-applications-health-status.jpg?fit=max&auto=format&n=GVEyjNcGG4U_6mB_&q=85&s=36e1d5f7258bf387ac1d8590d3095025" alt="The image shows the Argo CD dashboard displaying several applications with their health status marked as &#x22;Healthy&#x22; and &#x22;Synced.&#x22; Each application card includes details like project, repository, and last sync time." width="1920" height="1080" data-path="images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/argo-cd-dashboard-applications-health-status.jpg" />
</Frame>

## Deploying a Helm chart with Argo CD

Argo CD can deploy a Helm chart directly from a Git repo. In the Argo CD UI you typically:

1. Create a new Application.
2. Point `repoURL` to your Git repository and `path` to the chart folder (e.g., `manifests/helm/highway-chart`).
3. Choose a target cluster/namespace and optional automated sync policy.
4. Provide `values.yaml` or overrides if you want to change defaults at deploy time.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/GVEyjNcGG4U_6mB_/images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/argo-cd-application-settings-ui.jpg?fit=max&auto=format&n=GVEyjNcGG4U_6mB_&q=85&s=9621a513930ad72c5b6250fbd0a566b1" alt="The image shows a user interface for configuring application settings in Argo CD, including options for sync policy and other settings." width="1920" height="1080" data-path="images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/argo-cd-application-settings-ui.jpg" />
</Frame>

Argo CD recognizes the Helm chart and prompts for values files or overrides. Point it at the chart’s `values.yaml` or supply a custom override file to change runtime configuration.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/GVEyjNcGG4U_6mB_/images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/argo-cd-interface-application-form.jpg?fit=max&auto=format&n=GVEyjNcGG4U_6mB_&q=85&s=bcbdd3473594739af4467d4fd95f7cec" alt="The image shows the Argo CD interface, displaying a form for creating or managing applications, with details about the Git repository and destination cluster URL." width="1920" height="1080" data-path="images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/argo-cd-interface-application-form.jpg" />
</Frame>

Once created, Argo CD renders the Helm chart and creates the Kubernetes resources — e.g., Deployment, Service, and Pods configured by `values.yaml`. With the example above (replicaCount: 1) you will initially see a single pod.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/GVEyjNcGG4U_6mB_/images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/argo-cd-web-interface-synced-app.jpg?fit=max&auto=format&n=GVEyjNcGG4U_6mB_&q=85&s=417e5471bcee67b71c9b3541d939e854" alt="The image shows an Argo CD web interface displaying the details of a synced application, including its health and sync status, within a graphical resource tree view." width="1920" height="1080" data-path="images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/argo-cd-web-interface-synced-app.jpg" />
</Frame>

## Updating configuration: Git vs UI overrides

You can change chart configuration in two common ways:

* Edit `values.yaml` in the Git repository and let Argo CD pick up the change via GitOps sync, or
* Provide overrides in the Argo CD Application (UI or Application manifest), which are useful for temporary or environment-specific changes.

Example Argo CD Application manifest that references a Helm chart and passes a values file and parameter overrides:

```yaml theme={null}
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: helm-demo-app
spec:
  project: default
  source:
    repoURL: http://host.docker.internal:5000/kk-org/cgoa-demos
    path: manifests/helm/highway-chart
    targetRevision: HEAD
    helm:
      valueFiles:
        - values.yaml
      parameters:
        - name: replicaCount
          value: "7"
        - name: image.tag
          value: "green"
        - name: service.type
          value: "NodePort"
  destination:
    server: https://kubernetes.default.svc
    namespace: helm-demo-app
  syncPolicy:
    automated: {}
    syncOptions:
      - CreateNamespace=true
```

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/GVEyjNcGG4U_6mB_/images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/argo-cd-user-interface-helm-demo.jpg?fit=max&auto=format&n=GVEyjNcGG4U_6mB_&q=85&s=5fa70be28ac4de9f92a6ac577a41f8b4" alt="The image shows the Argo CD user interface displaying details of a Helm demo application. Options such as sync settings, retry options, and application status are visible." width="1920" height="1080" data-path="images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/argo-cd-user-interface-helm-demo.jpg" />
</Frame>

You can also edit parameters from the Argo CD UI. For example, change `replicaCount` to `7`, set `image.tag` to `green`, or update other values. After saving, Argo CD will detect a drift (OutOfSync) between the live cluster and the desired state.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/GVEyjNcGG4U_6mB_/images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/argo-cd-helm-chart-parameters-screenshot.jpg?fit=max&auto=format&n=GVEyjNcGG4U_6mB_&q=85&s=844b31952716caa367cb8627b15306e3" alt="The image shows a screenshot of an Argo CD application interface with parameters set for a Helm chart, including container port, environment variables, image repository, and replica count." width="1920" height="1080" data-path="images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/argo-cd-helm-chart-parameters-screenshot.jpg" />
</Frame>

Argo CD shows diffs between live manifests and desired manifests (e.g., `replicas: 1` vs `replicas: 7`, changed image tags, or modified env vars). When you run a sync, Argo CD applies the updated manifests to the cluster.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/GVEyjNcGG4U_6mB_/images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/argo-cd-app-dashboard-sync-status.jpg?fit=max&auto=format&n=GVEyjNcGG4U_6mB_&q=85&s=c4ea6c9b3f888eb4ef146d8390c666fd" alt="The image shows a user interface of the Argo CD application dashboard, displaying the sync status and health of a &#x22;helm-demo-app&#x22; and related services in a flowchart format. The &#x22;helm-demo-app&#x22; is marked as &#x22;OutOfSync&#x22; while its health status is &#x22;Healthy.&#x22;" width="1920" height="1080" data-path="images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/argo-cd-app-dashboard-sync-status.jpg" />
</Frame>

If a sync gets stuck or an operation must be interrupted, Argo CD provides controls to terminate and re-trigger operations.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/GVEyjNcGG4U_6mB_/images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/software-application-terminate-dialog-sync-status.jpg?fit=max&auto=format&n=GVEyjNcGG4U_6mB_&q=85&s=f90fa8698cafba07611f6d1fbaf07047" alt="The image shows a software application interface with a pop-up dialog asking if the user wants to terminate an operation. It also displays system status information related to a sync operation." width="1920" height="1080" data-path="images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/software-application-terminate-dialog-sync-status.jpg" />
</Frame>

After a successful sync, the cluster reflects the updated values (for example, `replicaCount: 7` results in 7 running pods). If something doesn’t render properly in the Argo CD UI (for example, quoting/format issues), check your YAML formatting in the override editor and prefer properly formatted YAML.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/GVEyjNcGG4U_6mB_/images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/argo-cd-helm-demo-app-interface.jpg?fit=max&auto=format&n=GVEyjNcGG4U_6mB_&q=85&s=04259dbdd24d147e6b5f1f48b238d3bd" alt="The image displays a web interface of Argo CD, detailing the &#x22;helm-demo-app&#x22; with its application health and sync status, along with a visual representation of the application's components and their health states." width="1920" height="1080" data-path="images/Prep-Course-GitOps-Certified-Associate-CGOA/Tooling/Demo-Helm/argo-cd-helm-demo-app-interface.jpg" />
</Frame>

A consistent values override you can paste into Argo CD’s editor:

```yaml theme={null}
replicaCount: 9
image:
  tag: "green"
env:
  - name: POD_COUNT
    value: "9"
```

With that override and a sync, the cluster will run nine pods using the updated image tag and environment variable.

<Callout icon="lightbulb" color="#1CB2FE">
  Tip: Keep configuration as code in Git (edit `values.yaml` in your repo) so changes remain auditable and follow GitOps best practices. Use Argo CD parameters or UI overrides for temporary or environment-specific adjustments.
</Callout>

## Summary

Helm templates + `values.yaml` let you templatize Kubernetes manifests for reuse and consistency. Pairing Helm with Argo CD creates a GitOps workflow: store charts and values in Git, let Argo CD render and deploy them, and update configuration through Git or controlled UI overrides to reconcile clusters to the desired state.

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/gitops-certified-associate-cgoa/module/24630e6a-9f49-42d1-abd0-75bafc02ce01/lesson/521f8b23-4b5d-47d4-961f-c184187a8b71" />
</CardGroup>
