Table of Contents

Prometheus and Grafana on K3s

The kube-prometheus-stack Helm chart is the standard way to deploy a complete Prometheus + Grafana monitoring stack on Kubernetes.

What this page covers

  • Installing the kube-prometheus-stack via Helm
  • Accessing the Grafana UI via Traefik ingress
  • Pre-built dashboards for K3s, nodes, and services
  • Adding a custom data source
  • Persistent storage for Prometheus metrics

Installation

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

helm install kube-prometheus-stack prometheus-community/kube-prometheus-stack \
  --namespace monitoring \
  --create-namespace \
  -f values.yaml

Key values to configure:

  • grafana.adminPassword — set a strong admin password
  • prometheus.prometheusSpec.retention — how long to keep metrics (default: 10 days)
  • prometheus.prometheusSpec.storageSpec — persistent volume for metrics

Accessing Grafana

Create a Traefik IngressRoute (K3s track) or nginx config (Docker track) to expose Grafana at https://grafana.example.com.

Default login: admin / (password from values).

Pre-built dashboards

The kube-prometheus-stack ships with dashboards for:

  • Kubernetes cluster overview
  • Node exporter (CPU, memory, disk, network per host)
  • Kubernetes pods and deployments

Import additional dashboards from grafana.com/dashboards.