Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster relocation #1261

Closed
sentaycan opened this issue May 13, 2024 · 4 comments
Closed

Cluster relocation #1261

sentaycan opened this issue May 13, 2024 · 4 comments

Comments

@sentaycan
Copy link

Hello, I am copying my PVC to a cluster in a different region as below, but now I want to delete my source cluster and use my destination cluster as source cluster, what is the most optimal way to do this?

kubectl --context west2 -n mysql create -f - <<EOF apiVersion: volsync.backube/v1alpha1 kind: ReplicationDestination metadata: name: mysql spec: rsyncTLS: copyMethod: Snapshot capacity: 8Gi accessModes: ["ReadWriteOnce"] storageClassName: gp3-csi volumeSnapshotClassName: csi-aws-vsc keySecret: east-west serviceType: LoadBalancer EOF
kubectl --context east2 -n mysql create -f - <<EOF apiVersion: volsync.backube/v1alpha1 kind: ReplicationSource metadata: name: mysql spec: sourcePVC: data-mysql-0 trigger: schedule: "*/5 * * * *" rsyncTLS: keySecret: east-west address: abad73aa2ca4441ed8c9e13f1095c453-95258c1d3ff95327.elb.us-west-2.amazonaws.com copyMethod: Snapshot volumeSnapshotClassName: csi-aws-vsc EOF

@tesshuflower
Copy link
Contributor

@sentaycan
Once you have a PVC on the destination and you're happy with it (i.e. you've created a PVC from the snapshot created by the replicationdestination and it contains your data), then you will just have to do the reverse to setup a replication going in the other way.

That is, you'll need to create a replicationdestination on the old source (new destination) cluster, and your new PVC on the destination (that you now want to be the source) should be the sourcePVC for a new replicationsource.

@tesshuflower
Copy link
Contributor

One note - on the new destination cluster, since it contains the old Source PVC, you can use this as your destinationPVC in your replicationdestination if you wish - this means the initial sync back from new source to new destination should be quicker as the destination PVC already contains a lot of the data.

@sentaycan
Copy link
Author

Thank you, but I want to connect the PVC in DestinationCluster to my application, how can I do this, I couldn't do it :(

@sentaycan
Copy link
Author

And my question was actually this.
I want to delete my source cluster and use the destination cluster as the main cluster.
What is the most optimal way to do this?

@backube backube locked and limited conversation to collaborators May 14, 2024
@tesshuflower tesshuflower converted this issue into discussion #1266 May 14, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants