Hi, this may be a stupid question, but I need some clarity.
I am trying to launch grafana on kubernetes using helm chart. If I am using a postgres database to store my grafana dashboards and users why do I need to enable persistence(using pvc or statefulset)?
What kind of data is stored in the pvc? If the data is only plugins, then I think plugins will be installed each time a pod is restarted. So, it is not exactly lost on restart, right?
Hi @usman.ahmad, thanks for the reply. Actually in my case the situation is different. I have already configured Grafana with PostgreSQL (which is in cloud) and now I want to remove pvc (which is mounted to /var/lib/grafana). It’s a production Grafana, so I want to be sure if I can remove PVC now
Thanks for the details. Just a few more questions to get better idea.
So, you are using the standard Grafana Helm Kubernetes setup (no High Avability setup) ?
As I understood you that you deployed the Grafana from start using PostgreSQL backend Database which is running on the cloud. So where you want to move the Database i.e. to another cloud or a local storage?
Can you please send us your PVC configuration file so that we can take a look?
Hi @usman.ahmad , we are using Grafana with Kustomization (rendered from Helm chart, yes).In the initial setup, we used Grafana with the standard built-in SQLite database, requiring Persistent Volume Claims (PVC). However, later on, we configured for Grafana a cloud-based database. I’m interested in confirming whether PVC is still necessary in this updated configuration. As I said, PVC is mounted into /var/lib/grafana.
Yes, if you are using a separate DB in cloud now you should be able to remove the PVC. Assuming it is configured correctly.
But please note that since we don’t maintain the grafana helm charts officially and this kind of scenario is not tested, So we can’t guarantee it (plus you used Kustomization tool to render it, so recommend way is to first try it out in a test deployment before on production. And even it all works, then make a copy of production before applying on it).
But in general speaking the answer we posted is correct in technical terms.