Keep grafana dashboard for k8s

HI,

We have configured Grafana user and admin roles using Grafana.ini which works great.

Now we want to provide some permission to user to
see specific dashboards, e.g. user X can see 5 dashboard and user Y can see 8 dashboards according to some configurations (permissions).

We were able to keep this config in Grafana UI but if the pod is fail the details is deleted, we are using latest prom-kube-stack .

My question is how should we
store this data right, even if the pod is restarted?

we are using grafana via kube-prom stack

The kube helm chart config

Any solution/direction will be helpful as I believe that grafana store this data someware but not sure where …

I found this link which is talking about the store of the users on database etc

But not sure how to configure it using kube-prometheus-stack

if there any other solution way to solve it please let me know.

HI,

Any idea how to make it work, we stuck with this is issue for long time.
if something isnt clear please let me know.

Hi Peter,

Not sure if you have solved this already but just add this under grafana:

  deploymentStrategy:
    type: Recreate
  persistence:
    enabled: true
    type: pvc
    storageClassName: "whatever storage class name you want to use- use kubectl get sc"
    accessModes:
    - ReadWriteOnce
    size: 4Gi
    finalizers:
    - kubernetes.io/pvc-protection

The kube prometheus stack uses grafana helm chart values: helm-charts/values.yaml at main · grafana/helm-charts · GitHub

If you have solved it already hopefully this helps someone else looking for persistence.