Reclaim persistent volume

I deleted my stateful set on openshift believing that I could reuse my persistent volume claim but it got deleted.

On the bright side I think I still have this EBS volume on AWS so I added it again on openshift but when I try to reuse it my pvc named elasticsearch-data gets deleted and my persistent volume gets released.

Anyone know what should I do to mount this or get the data from the volume?

We have an example tool to reattach persistent volumes: https://github.com/elastic/cloud-on-k8s/tree/master/hack/reattach-pv

Though it is not officially supported or tested extensively.

1 Like

I didn't really understand how to use the tool the readme refers to a script I didn't have.

However the templates included with it really helped me get a better understanding of what I should do and I managed to reattach the persistent volumes. thanks