Skip to content

Use a third-party chart

Helm is the package manager for Kubernetes. A chart bundles an application’s manifests so you install it with one command and configure it through values. This installs Grafana from its official chart.

It assumes:

Terminal window
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update

A chart’s values.yaml is how you override its defaults. Create a namespace and a values file:

Terminal window
kubectl create namespace monitoring
Terminal window
cat <<'EOF' > values.yaml
adminPassword: change-me
persistence:
enabled: true
EOF

persistence provisions a PVC from the cluster’s default StorageClass, so dashboards survive pod restarts.

Terminal window
helm install grafana grafana/grafana -n monitoring -f values.yaml
Terminal window
kubectl rollout status -n monitoring deploy/grafana
kubectl port-forward -n monitoring svc/grafana 3000:80

Open http://localhost:3000 and log in as admin with the password you set.

Edit values.yaml, then re-apply. Helm diffs the release and bumps its revision:

Terminal window
helm upgrade grafana grafana/grafana -n monitoring -f values.yaml
helm list -n monitoring
Terminal window
helm uninstall grafana -n monitoring
kubectl delete namespace monitoring