Symptom:
By default OKE(Oracle Kubernete Engine) storageclass is oci which is OCI block volumeIf we don't specify storageclass in yaml file, OKE would automatically create block volumes as persistent volumes and attach to pods for us which is very convenient.
However reclaim policy of persistent volumes is "DELETE"
It means if we delete pv and pvc OKE created, OKE would delete block volumes in OCI as well.
Solution:
To prevent potential data loss due to reclaim policy " DELETE" , we can update it to be "RETAIN"kubectl patch pv <your-pv-name> -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'
Please refer kubernete doc for more details