High availability configuration for Grafana

Has anyone configured high availability for Grafana using database as a backend?
Can someone please help me understand the HA configuration? The documentation says

First, you need to set up MySQL or Postgres on another server and configure Grafana to use that database. You can find the configuration for doing that in the [database] section in the Grafana config. Grafana will now persist all long term data in the database. How to configure the database for high availability is out of scope for this guide. We recommend finding an expert on the database you're using.```

Hey :slightly_smiling_face:
it’s fairly simple as it said in documentation.
Just setup DB (in My case it’s Postgres RDS)
and spawn multiple grafana replicas.

change Your grafana.ini

    type: postgres
    ssl_mode: require```
I have grafana in k8s so credentials for DB are taken from secrets as ENV

There is settings in helm:

  - name: grafana-main
    optional: false
  - name: grafana-rds
    optional: false
  - name: grafana-okta
    optional: false```
```- apiVersion: [kubernetes-client.io/v1](http://kubernetes-client.io/v1)
    kind: ExternalSecret
      name: grafana-rds
      backendType: secretsManager
        - key: /monitoring/integration/grafana/rds
          name: GF_DATABASE_HOST
          property: hostname
        - key: /monitoring/integration/grafana/rds
          name: GF_DATABASE_USER
          property: username
        - key: /monitoring/integration/grafana/rds
          name: GF_DATABASE_PASSWORD
          property: password
        - key: /monitoring/integration/grafana/rds
          name: GF_DATABASE_NAME
          property: sql_db_name```

For grafana persistent storage are you also using EFS or just ebs pvc (along with rds postgres) ?

I’m also running Grafana as a pod in a k8s cluster similarly to you in aws

Thank you. I will try this.

I don’t have any persistence for grafana except external RDS

      - configMap:
          defaultMode: 420
          name: grafana
        name: config
      - emptyDir: {}
        name: storage
      - emptyDir: {}
        name: sc-dashboard-volume
      - configMap:
          defaultMode: 420
          name: grafana-config-dashboards
        name: sc-dashboard-provider```
dashboards are stored as ConfigMaps and synced by sidecar