<p>I have application that have some user settings and it runs on kubernetes cluster.
I would like the user settings to survive application crash/pod restart.</p>
<p>I was thinking first about having a DB instance for keeping it outside of kubernetes. Then I thought, maybe I could just abuse etcd to store small amount of custom data.
Is it a good approach to keep things simple?</p>
<p>Another options I see:</p>
<ol>
<li>separate db instance outside of kubernetes(overkill)</li>
<li>some json file on PV volume in kubernetes being constantly re-read.</li>
<li>perhaps use hashicorp vault?</li>
</ol>
<p>What would you use? Its very small amount of data</p>

<p>you can use <code>Persistent Volume</code> and <code>Persistent Volume claim</code>. <code>pvc</code> or <code>Persistent Volume claim</code> will keep data incase of pod restart or pod crash.  this the best way i think to store user data. you can have the suitable storage type and resource size as per your requirement. you can look into official doc. <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolumeclaim" rel="nofollow noreferrer">Ref</a></p>
