Can i replicate data between Kubernetes PV in two seperate clusters situated in different data centres
I have a cluster with associated PV running in Primary site. I have a sperate cluster running in DR site.
How do i continuously replicate data in primary site to DR site so that when application is running from from DR , the data witten to PR PVs are available in DR.
Application writes files to the PV like xls, csv etc.
I can use any OSS storage orchestrator like openebs, rook, storageos etc
Database is outside kubernetes
CodePudding user response:
Forget Kubernetes for some time. End of the day, you are talking sync files between two storages. Mounting it into Kubernetes as PV is just your choice. So it can be as simple as a rsync
setup between two storages?
CodePudding user response:
Narain is right. Kubernetes doesn't contain any functionality that would allow you to synchronize two PVs used by two different clusters. So you would need to find your own solution to synchronize those two filesystems. It can be an existing solution like lsyncd
, proposed in this thread or any custom solution like the above mentioned rsync
which can be wrapped into a simple bash
script and run periodically in cron
.