Operations 6 min read

How to Deploy and Configure Grafana for Real-Time Monitoring with Helm

This guide walks you through installing Grafana via Helm, configuring its values, deploying the service, verifying the deployment, and adding a Prometheus data source, enabling a fully functional monitoring dashboard for servers and networks.

Linux Ops Smart Journey
Linux Ops Smart Journey
Linux Ops Smart Journey
How to Deploy and Configure Grafana for Real-Time Monitoring with Helm

In the wave of digital transformation, data visualization has become an essential part of enterprise monitoring systems. Grafana, an open‑source visualization platform, is praised for its powerful features and ease of use, helping present server performance and network traffic data intuitively for faster, more effective decisions.

Grafana Overview

Grafana OSS lets you query, visualize, alert on, and explore metrics, logs, and traces from any source. Its data‑source plugins support time‑series databases (e.g., Prometheus, CloudWatch), logging tools (e.g., Loki, Elasticsearch), NoSQL/SQL databases (e.g., PostgreSQL), CI/CD tools (e.g., GitHub), and more, providing rich charts and visualizations on real‑time dashboards.

Installation and Configuration

1. Download the Grafana Helm chart package

<code>$ helm repo add grafana https://grafana.github.io/helm-charts
"grafana" has been added to your repositories

$ helm pull grafana/grafana --version 7.3.12</code>

2. Push the chart to an internal Harbor registry

<code>$ helm registry login core.jiaxzeng.com --username admin
Password: 
Login Succeeded

$ helm push prometheus-25.25.0.tgz oci://core.jiaxzeng.com/plugins
Pushed: core.jiaxzeng.com/plugins/grafana:7.3.12
Digest: sha256:480fed052af924f971c308ab89b2bff72e262cedd8045ee981e58280ecdcfaa8</code>

3. Pull the chart on an internal host

<code>$ sudo helm registry login core.jiaxzeng.com --username admin
Password: 
Login Succeeded

$ sudo helm pull oci://core.jiaxzeng.com/plugins/grafana --version 7.3.12 --untar --untardir /etc/kubernetes/addons/</code>

4. Create the Helm values file

<code>$ cat <<'EOF' | sudo tee /etc/kubernetes/addons/grafana-values.yaml > /dev/null
# Use internal Harbor image
image:
  registry: core.jiaxzeng.com
  repository: library/monitor/grafana

initChownData:
  enabled: true
  image:
    registry: core.jiaxzeng.com
    repository: library/busybox

# Persistent volume claim
persistence:
  enabled: true
  type: pvc
  storageClassName: ceph-rbd-storage
  accessModes:
    - ReadWriteOnce
  size: 10Gi

# Access Grafana at /grafana
env:
  GF_SERVER_ROOT_URL: "%(protocol)s://%(domain)s:%(http_port)s/grafana"
  GF_SERVER_SERVE_FROM_SUB_PATH: true

adminUser: admin
adminPassword: admin321

ingress:
  enabled: true
  ingressClassName: nginx
  annotations:
    cert-manager.io/cluster-issuer: ca-cluster-issuer
  path: /grafana
  pathType: Prefix
  hosts:
    - ops.jiaxzeng.com
  tls:
    - secretName: ops.jiaxzeng.com-tls
      hosts:
        - ops.jiaxzeng.com

testFramework:
  enabled: false
EOF</code>

5. Deploy Grafana

<code>$ helm -n kube-system install grafana -f grafana-values.yaml /etc/kubernetes/addons/grafana/</code>

Verification and Adding a Data Source

Check that Grafana pods are running:

<code>$ kubectl -n kube-system get pod -l app.kubernetes.io/instance=grafana
NAME                     READY   STATUS    RESTARTS   AGE
grafana-7d9b67598b-h44lp   1/1     Running   0          3m48s</code>

Access Grafana via a browser at

https://ops.jiaxzeng.com

, then navigate to Menu → Connections → Data Sources to add a new source.

Select Prometheus as the data source and provide its address. Ensure that if Prometheus was started with the

--web.external-url

flag, the full path is included.

Test the data source to confirm connectivity.

Conclusion

By following these steps, you have successfully built a Grafana‑based monitoring system. Mastering Grafana is a valuable skill for both developers and operations engineers, helping them better understand and manage their systems.

monitoringKubernetesPrometheusData VisualizationGrafanaHelm
Linux Ops Smart Journey
Written by

Linux Ops Smart Journey

The operations journey never stops—pursuing excellence endlessly.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.