<p>The setup is on GCP GKE. I deploy a Postgres database with a persistent volume (retain reclaim policy), and:</p>

<pre><code>  strategy:
    type: Recreate
</code></pre>

<p>Will the data be retained or re-initialized if the database pod gets deleted?</p>

<p>The update strategy has nothing to do with the on-delete behavior. That's used when a change to the pod template triggers an update. Basically does it nuke the old ReplicaSet all at once or gradually scale things up/down. You almost always way RollingUpdate unless you are working with software that requires all nodes be on exactly the same version and understand this will cause downtime on any change.</p>

<p>As for the Retain volume mode, this is mostly a safety net for admins. Assuming you used a PVC, deleting the pod will have no effect on the data since the volume is tied to the claim rather than the pod itself (obviously things will go down while the pod restarts but that's unrelated). If you delete the PVC, a Retain volume will be kept on the backend but if you wanted to do anything with it you would have to go in and do it manually. It's like a "oops" protection, requires two steps to actually delete the data.</p>
