Automatically map DO volumes even if cluster is recreated

August 22, 2019 228 views
Clustering Kubernetes Debian

Hi.

I’m wondering if is possible to automatically reuse existing DO volumes when we recreate the cluster?

Let say that I have some Volumes already create via CSI and when I delete the cluster, Volumes remains. Now, when I create again the cluster I want to reuse those Volumes exactly how were used before. This means that when a new PVC is created then it should know to map to some Volumes fro DO. Does CSI currently support this type of functionalities?

Thx!

2 Answers

Hi there!

We currently dont support this type of functionality right out of the box but it is possible to accomplish. Maybe not as automatic as you would like but it is possible to reuse pv’s.

https://github.com/digitalocean/csi-digitalocean/blob/master/examples/kubernetes/pod-single-existing-volume/README.md

Regards,

John Kwiatkoski
Senior Developer Support Engineer

Well, I did play with that but it seems that I should as well attach volume manually, which is not smth that I don’t want todo in a cluster as this depends on which node does have more disk.

Do you have any plans to add such functionality in the future? Doesn’t this seem simple to implement?

Thx!

Have another answer? Share your knowledge.