Grafana 7: How to install in OpenShift 3 (Kubernetes) with persistent volume claim (pvc)?


I am able to create a pod in OpenShift 3.11 with grafana/grafana:latest:ubuntu without problems. The pod comes up and serves grafana. I can configure it and access an influx db, load my dashboards etc. But how to store a persistant configuration?

I tried to “add storage” in the OpenShift webinterface and mounted a pvc to /var/lib/grafana. But if I do that, the container creation failes.

What is the best practive to deploy grafana in OpenShift in a way that it preserves settings as accounts, data sources and dashboards?

Persistent volume claims worked fine with with the deployment of my influxdb - the pod with the influxdb happly stores its data in a mounted pvc