How can I persist the API key I create for the Grafana API?

12/10/2019

I'm running Grafana on Kubernetes (really Openshift) and it is not mounted to a PVC. I need an API key to access the dashboard API so I can pull some dashboards for reporting on our Kafka cluster. The problem is when I create the API key and Grafana is redeployed the API key is no longer there since it is not being stored in some persistent storage option. Is there a way to persist an API key through configurations passed to Grafana? Or some other way that I can make sure the API key I create is there even after a new deployment?

I thought it might be stored in the sqlite db but when I checked it there were no tables so it doesn't seem to be stored there.

Edit 1

I'm using Grafana v5.4.3

-- jimjim
grafana
kubernetes
openshift

0 Answers