kube-arangodb icon indicating copy to clipboard operation
kube-arangodb copied to clipboard

How do I configure using custom pvc as data storage?

Open xiashengjie opened this issue 1 year ago • 9 comments

How do I configure using custom pvc as data storage? Can you give an example?

xiashengjie avatar Feb 20 '24 13:02 xiashengjie

Hello!

By custom PVC - do you mean manually created PVC Objects?

Best, Adam.

ajanikow avatar Feb 21 '24 08:02 ajanikow

Yes, I am using juicefs to do storage and calculation separation for arangodb on k8s; therefore, I do not want to use local storage; I manually created a pvc. I would like to know how to configure the arangodb cluster on k8s to use the pvc I created by myself as data storage. @ajanikow

xiashengjie avatar Feb 21 '24 08:02 xiashengjie

Hello!

Which mode is interesting for you - Single/Cluster?

And which versions of ArangoDB/Operator do you use? CE or EE?

Best Regards, Adam.

ajanikow avatar Feb 21 '24 21:02 ajanikow

I want to do this on cluster mode and I'm using the CE version,Looking forward to your reply @ajanikow

xiashengjie avatar Feb 22 '24 03:02 xiashengjie

Hello!

For cluster mode in CE, it will be tricky.

In EE we can change member indexing, which will enable us to use predictable member names.

For CE you need to prepare your own ArangoDeployment Status, like described here: https://arangodb.github.io/kube-arangodb/docs/how-to/recovery.html#initial-arangodeployment

Best Regards, Adam.

ajanikow avatar Feb 22 '24 07:02 ajanikow

I mean that I have a pvc containing a database file, and I just want to change the database path to access the pvc in cluster mode, like setting the --database.directory parameter. Can this operation be implemented? @ajanikow

xiashengjie avatar Feb 22 '24 07:02 xiashengjie

Hello!

No, the above example shows you how to tell ArangoDB to use your PVC instead of a new one - you cant mount 2 data PVCs, the data format in the PVC needs to be ArangoDB-compatible and it always needs to be under /data

Best Regards, Adam.

ajanikow avatar Feb 22 '24 08:02 ajanikow

I want to store the data on another node instead of using local storage. Is it possible to do so according to the sample document you gave? @ajanikow

xiashengjie avatar Feb 22 '24 08:02 xiashengjie

I want to store the data on another node instead of using local storage.

You can use PVC definition, the document just shows you how to create it for LocalStorage, but you can create PVC on your own (store it anywhere you want, just PV and PVC need to be valid)

ajanikow avatar Feb 22 '24 12:02 ajanikow