I am using PV with EFS. I have created a PV and PVC. My PV goes back to released status after I delete my StatefulSets. When I delete and re-apply my StatefulSets, it does not get attached to the same PV, instead the PVC status shows pending. My question is how do I get my pods in StatefulSet rebound to the same PV?
[kubeXpress]# k get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY **STATUS** CLAIM STORAGECLASS REASON AGE
efsvol 1Mi RWO Retain **Released** default/efsvol aws-efs 10m
[kubeXpress]# k get pvc
efsvol **Pending** aws-efs 10m
[kubeXpress]# k get po
NAME READY STATUS RESTARTS AGE
web-0 0/1 **Pending** 0 4m
[kubeXpress]# k describe po web-0
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 2m (x37 over 12m) default-scheduler pod has unbound PersistentVolumeClaims (repeated 6 times)