title: How to import custom dashboards to grafana using helm
body: <p>I'm trying to understand helm and I wonder if someone could ELI5 to me something or help me with something.</p>
  
  <p>So i did run below:</p>
  
  <pre><code>helm repo add coreos https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/
  </code></pre>
  
  <p>Then I installed kube-prometheus by using below: </p>
  
  <pre><code>helm install coreos/kube-prometheus --name kube-prometheus -f values.yaml --namespace monitoringtest
  </code></pre>
  
  <p>Everything works fine but I'm trying to add some custom dashboards from json files and I'm struggling to understand how to do it.</p>
  
  <p>I was following this: <code>https://blogcodevalue.wordpress.com/2018/09/16/automate-grafana-dashboard-import-process/</code></p>
  
  <p>In my values.yaml I added below</p>
  
  <pre><code>serverDashboardConfigmaps:
    - example-dashboards
  </code></pre>
  
  <p>I understand that if I do:</p>
  
  <pre><code>helm upgrade --install kube-prometheus -f values.yaml --namespace monitoringtest coreos/kube-prometheus
  </code></pre>
  
  <p>That should cause grafana to pickup a below configmap called <code>example-dashboards</code> and load *.json files from <code>custom-dashboards</code> folder. </p>
  
  <pre><code>apiVersion: v1
  kind: ConfigMap
  metadata:
    name: example-dashboards
  data:
  {{ (.Files.Glob "custom-dashboards/*.json").AsConfig | indent 2 }}
  
  # Or
  # 
  # data:
  #   custom-dashboard.json: |-
  # {{ (.Files.Get "custom.json") | indent 4 }}
  #
  # The filename (and consequently the key under data) must be in the format `xxx-dashboard.json` or `xxx-datasource.json`
  # for them to be picked up.
  </code></pre>
  
  <p>Now two questions:</p>
  
  <p>How do I add above configmap to this helm release?</p>
  
  <p>Where is this <code>custom-dashboards</code> folder located? Is it on my laptop and then is send to grafana?</p>
  
  <p>Do I need to copy all of <code>https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/</code> onto my laptop?</p>
  
  <p>Sorry for explaining everything but I'm just trying to understand this.</p>