<p>I need to deploy Grafana in a Kubernetes cluster in a way so that I can have multiple persistent volumes stay in sync - similar to what they <a href="https://kubernetes.io/docs/tasks/run-application/run-replicated-stateful-application/" rel="nofollow noreferrer">did here</a>.</p>
<p>Does anybody know how I can use the <a href="https://ishanul.medium.com/kubernetes-statefulsets-a90891ae769d" rel="nofollow noreferrer">master/slave architecture</a> so that only 1 pod writes while the others read? How would I keep them in sync? Do I need additional scripts to do that? Can I use Grafana's built-in sqlite3 database or do I have to set up a different one (Mysql, Postgres)?</p>
<p>There's really not a ton of documentation out there about how to deploy statefulset applications other than Mysql or MongoDB.</p>
<p>Any guidance, experience, or even so much as a simple suggestion would be a huge help. Thanks!</p>

FestiveHydra235
<ol>
<li>StatefulSets are not what you think and have nothing to do with replication. They just handle the very basics of provisioning storage for each replica.</li>
<li>The way you do this is as you said by pointing Grafana at a &quot;real&quot; database rather than local Sqlite.</li>
<li>Once you do that, you use a Deployment because Grafana itself is then stateless like any other webapp.</li>
</ol>
