# Keep grafana dashboard for k8s

**URL:** <https://community.grafana.com/t/keep-grafana-dashboard-for-k8s/45532>\
**Category:** Configuration\
**Created:** [April 2, 2021, 3:00pm UTC](https://community.grafana.com/t/keep-grafana-dashboard-for-k8s/45532 "2021-04-02T15:00:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![petersorjb](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@petersorjb](https://community.grafana.com/u/petersorjb)\
**Post date:** [April 2, 2021, 3:00pm UTC](https://community.grafana.com/t/keep-grafana-dashboard-for-k8s/45532/1 "2021-04-02T15:00:01Z")

</div>

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

> <https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml#L600>

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

> **[Configuration](https://grafana.com/docs/grafana/latest/administration/configuration/#database)**
>
> Configuration documentation

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

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

---

<div class="post-metadata">

**Author:** ![petersorjb](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@petersorjb](https://community.grafana.com/u/petersorjb)\
**Post date:** [April 4, 2021, 6:22am UTC](https://community.grafana.com/t/keep-grafana-dashboard-for-k8s/45532/2 "2021-04-04T06:22:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mordy](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@mordy](https://community.grafana.com/u/mordy)\
**Post date:** [September 13, 2022, 2:40pm UTC](https://community.grafana.com/t/keep-grafana-dashboard-for-k8s/45532/3 "2022-09-13T14:40:45Z")

</div>

Hi Peter,

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

```auto
  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](https://github.com/grafana/helm-charts/blob/main/charts/grafana/values.yaml)

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