Skip to content

Instantly share code, notes, and snippets.

@taking
Created June 22, 2022 00:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taking/79d76e0a547af54ad1483f67207ee989 to your computer and use it in GitHub Desktop.
Save taking/79d76e0a547af54ad1483f67207ee989 to your computer and use it in GitHub Desktop.

Grafana Installation with Helm

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+

helm chart

datasources - grafana-values.yaml

cat <<EOF > grafana-values.yaml
datasources:
  datasources.yaml:
    apiVersion: 1
    datasources:
    - name: Prometheus
      type: prometheus
      url: http://prometheus-server.telemetry.svc.cluster.local
      basicAuth: false
      basicAuthUser:
      basicAuthPassword:
      isDefault: true
      editable: true
      jsonData:
        graphiteVersion: "1.1"
        tlsAuth: false
        tlsAuthWithCACert: false
dashboardProviders:
  dashboardproviders.yaml:
    apiVersion: 1
    providers:
    - name: 'default'
      orgId: 1
      folder: ''
      type: file
      disableDeletion: false
      editable: true
      options:
        path: /var/lib/grafana/dashboards/default
dashboards:
  default:
    ceph-cluster:
      gnetId: 2842
      revision: 14
      datasource: Prometheus
    kubernetes-cluster:
      gnetId: 7249
      revision: 1
      datasource: Prometheus
EOF

helm update

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

Install

helm install grafana grafana/grafana \
    --create-namespace \
    --namespace telemetry \
    --set persistence.enabled=true \
    --set adminUser=admin \
    --set adminPassword=pgEGc9ZsCjYhczuI9rMGNpWscagmyKijxUgfHs0j \
    --set service.type=NodePort \
    --set service.nodePort=32071 \
    -f grafana-values.yaml

아이디 : admin 비밀번호 :

kubectl get secret --namespace telemetry grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo

Screenshot

image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment