Table of Contents

What are Helm Charts

https://helm.sh/

Helm helps you manage Kubernetes applications — Helm Charts help you define, install, and upgrade even the most complex Kubernetes application.

Installation

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
 

Best repositories

RepoBest For
Artifact HubDiscovering community charts
BitnamiProduction-ready app charts
Prometheus CommunityMonitoring stacks
ChartMuseumSimple self-hosted private repo
HarborEnterprise with security scanning
OCI registriesModern cloud-native distribution

Initialize a Helm Chart Repository from Bitnami

# list repositories
helm repo list
 
# add bitnami repository
helm repo add bitnami https://charts.bitnami.com/bitnami
 
# To update repo
helm repo update
 
# list artifacts
helm search repo bitnami
 
# remove repo
helm repo remove bitnami

Grafana from Artifacthub example

https://artifacthub.io

 helm search hub grafana-community
 
$ helm install grafana oci://ghcr.io/grafana-community/helm-charts/grafana
 
Pulled: ghcr.io/grafana-community/helm-charts/grafana:11.3.6
Digest: sha256:f0309463e35fa78fe47a337c09ae57da924de95fa93851592cd780b32f9ed82f
NAME: grafana
LAST DEPLOYED: Thu Apr  2 10:17:44 2026
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
1. Get your 'admin' user password by running:
 
   kubectl get secret --namespace default grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
 
2. The Grafana server can be accessed via port 80 on the following DNS name from within your cluster:
 
   grafana.default.svc.cluster.local
 
   Get the Grafana URL to visit by running these commands in the same shell:
     export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=grafana,app.kubernetes.io/instance=grafana" -o jsonpath="{.items[0].metadata.name}")
     kubectl --namespace default port-forward $POD_NAME 3000
 
3. Login with the password from step 1 and the username: admin
#################################################################################
######   WARNING: Persistence is disabled!!! You will lose your data when   #####
######            the Grafana pod is terminated.                            #####
#################################################################################
 

Uninstalling helms

helm uninstall grafana
 

Working with helm values

Adding persistence to grafana

                    +--------------+             +-----+
                    |              |             |     |
 Service & Ingress  |    Grafana   +<------------+ PVC |
<-------------------+              |             |     |
                    |  Deployment/ |             +-----+
                    |  StatefulSet |
                    +-----------+--+
                                ^                +------------+
                                |                |            |
                                +----------------+ Configmaps |
                                                 |   Secrets  |
                                                 |            |
                                                 +------------+

grafana-persistence.yaml

apiVersion: v1
kind: PersistentVolume
metadata:
  name: grafana-pv
spec:
  capacity:
    storage: 10Gi
  volumeMode: Filesystem
  accessModes:
  - ReadWriteOnce
  storageClassName: standard
  local:
    path: /mnt/grafana
  nodeAffinity:
    required:
      nodeSelectorTerms:
        - matchExpressions:
          - key: kubernetes.io/hostname
            operator: In
            values:
            - minikube
 

Apply persistence

kubectl apply -f grafana-persistence.yaml

Add storage to minikube

minikube ssh --node minikube
 
# sudo mkdir -p /mnt/grafana
# sudo chmod 777 /mnt/grafana
# exit

Implement grafana in imperative mode with persistence

helm install grafana oci://ghcr.io/grafana-community/helm-charts/grafana \
  --set persistence.enabled=true \
  --set persistence.size=10Gi \
  --set persistence.storageClassName=standard

Deploy Prometheus with Artifact Hub

Objective

Deploy a full Prometheus monitoring stack on a local Kubernetes cluster using Helm and the prometheus-community chart from Artifact Hub. By the end of this exercise you will be able to:

  • Add a Helm repository from Artifact Hub
  • Inspect chart default values
  • Customize a deployment with a values.yaml file
  • Enable persistence
  • Access the Prometheus UI
  • Upgrade and roll back a release

Prerequisites

ToolMinimum VersionCheck
kubectlv1.28+kubectl version --client
helmv3.12+helm version
Local clusterminikube / kind / k3skubectl cluster-info

Tip: If you don’t have a cluster, spin one up quickly with:

minikube start --memory=4096 --cpus=2

Part 1 — Add the Repository

1.1 Add the prometheus-community repo

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts

1.2 Update your local repo index

helm repo update

1.3 Search for available Prometheus charts

helm search repo prometheus-community

Expected output (truncated):

NAME                                    CHART VERSION   APP VERSION   DESCRIPTION
prometheus-community/prometheus         25.x.x          v2.x.x        Prometheus is a monitoring system and TSDB
prometheus-community/kube-prometheus-stack  ...
prometheus-community/alertmanager       ...

📌 Artifact Hub link: https://artifacthub.io/packages/helm/prometheus-community/prometheus

Part 2 — Inspect the Chart

2.1 View default values (and export)

helm show values prometheus-community/prometheus > prometheus-values.yaml

Open the file and locate the persistence section — notice it is disabled by default.

2.2 View chart metadata

helm show chart prometheus-community/prometheus

Part 3 — Create a Custom Values File

Create a file called prometheus-values.yaml with the configuration below:

## Enable persistence so data survives pod restarts
  persistentVolume:
    enabled: false
 
## Disable components not needed for this exercise
alertmanager:
  enabled: false
 
prometheus-pushgateway:
  enabled: false
 

Part 4 — Install Prometheus

4.1 Create a dedicated namespace

kubectl create namespace monitoring

4.2 Install the chart

helm install prometheus prometheus-community/prometheus \
  --namespace monitoring \
  --values prometheus-values.yaml

4.3 Verify the release

helm list --namespace monitoring
kubectl get pods --namespace monitoring

Wait until all pods show Running:

NAME                                    READY   STATUS    RESTARTS
prometheus-server-xxxxx                 2/2     Running   0
prometheus-node-exporter-xxxxx          1/1     Running   0
prometheus-kube-state-metrics-xxxxx     1/1     Running   0

Part 5 — Access the Prometheus UI

5.1 Port-forward

kubectl port-forward --namespace monitoring \
  svc/prometheus-server 9090:80

Then open: http://localhost:9090

5.2 View some mettrics

# CPU usage per node
100 - (avg by(instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)
 
# Memory available
node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes * 100

Part 6 — Upgrade the Release

Increase the retention period to 30 days without reinstalling:

helm upgrade prometheus prometheus-community/prometheus \
  --namespace monitoring \
  --values prometheus-values.yaml \
  --set server.retention=30d

Check the revision history:

helm history prometheus --namespace monitoring
REVISION   STATUS      DESCRIPTION
1          superseded  Install complete
2          deployed    Upgrade complete

Part 7 — Roll Back

If something goes wrong, roll back to the previous revision:

helm rollback prometheus 1 --namespace monitoring

Verify:

helm history prometheus --namespace monitoring

Part 8 — Clean Up

helm uninstall prometheus --namespace monitoring
kubectl delete namespace monitoring

Exercises (Optional Challenges)

#ChallengeHint
1Add Grafana alongside Prometheushelm install grafana grafana/grafana
2Enable Alertmanager and configure a Slack webhookalertmanager.enabled=true + config.receivers
3Use kube-prometheus-stack instead of bare PrometheusIncludes Grafana + Alertmanager out of the box
4Write a PrometheusRule CRD to alert on high CPURequires kube-prometheus-stack
5Set up remote_write to Grafana Cloudserver.remoteWrite values key

Key Commands Reference

# Add repo
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
 
# Search
helm search repo prometheus-community
helm search hub prometheus --max-col-width 80
 
# Inspect
helm show values prometheus-community/prometheus
helm show chart prometheus-community/prometheus
 
# Install / Upgrade
helm install <name> <chart> -n <namespace> -f values.yaml
helm upgrade <name> <chart> -n <namespace> -f values.yaml --set key=val
 
# Debug
helm list -n <namespace>
helm history <name> -n <namespace>
helm get values <name> -n <namespace>
 
# Rollback & Cleanup
helm rollback <name> <revision> -n <namespace>
helm uninstall <name> -n <namespace>