Answers: <p>It depends on what your <code>persistentVolumeReclaimPolicy</code> is. If you manually created/defined the PersistentVolume, then the default action is to keep the data. (This sounds like what you're doing.) </p>
  
  <p>If you are using something like EKS on Amazon, your PV's are dynamically generated EBS volumes. In that case, they will be deleted by default.</p>
  
  <p>A little bit more about reclamation: <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#reclaiming" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/storage/persistent-volumes/#reclaiming</a></p>
  
Answers: CC BY-SA 4.0
Answers: 2019-11-18T16:03:31.430Z
Answers: 2019-11-18T16:03:31.430Z
Answers: Matthew
Body: <p>I have a Kubernetes cluster based on 3 hosts managed via Rancher </p>
  
  <p>I've created Persistent Volume on the first host and use it via a claim by a PostgreSQL pod. My app is generating and storing there some data.</p>
  
  <p>Kubernetes docs state that "Persistent volume lasts through "Cluster lifetime".</p>
  
  <p>My question is - if I will delete a cluster and then create it again, and then create Persistent Volume on the same host (first one) with the same configuration will data be still there?</p>
  
  <p>My confusion stems from the fact that I don't quite get what is considered as "persistence" here. "Persistent Volume" entity within-cluster will obviously get deleted with a cluster. But whats about the data?</p>
  
Tags: <kubernetes><rancher><persistent-volumes>
Title: Will data contained withing Persistent Volume survive cluster deletion?
UserDisplayName: RandomByte
ThreadText: # Will data contained withing Persistent Volume survive cluster deletion?
  
  (Asked by: username_0 on 2019-11-18)
  
  I have a Kubernetes cluster based on 3 hosts managed via Rancher
  
  I've created Persistent Volume on the first host and use it via a claim by a PostgreSQL pod. My app is generating and storing there some data.
  
  Kubernetes docs state that "Persistent volume lasts through "Cluster lifetime".
  
  My question is - if I will delete a cluster and then create it again, and then create Persistent Volume on the same host (first one) with the same configuration will data be still there?
  
  My confusion stems from the fact that I don't quite get what is considered as "persistence" here. "Persistent Volume" entity within-cluster will obviously get deleted with a cluster. But whats about the data?
  
  **Tags:** kubernetes, rancher, persistent-volumes
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-11-18. Score: 3 | Accepted answer
  
  It depends on what your `persistentVolumeReclaimPolicy` is. If you manually created/defined the PersistentVolume, then the default action is to keep the data. (This sounds like what you're doing.)
  
  If you are using something like EKS on Amazon, your PV's are dynamically generated EBS volumes. In that case, they will be deleted by default.
  
  A little bit more about reclamation: <https://kubernetes.io/docs/concepts/storage/persistent-volumes/#reclaiming>
  
  
  ---
  
  