-
Hi! 😊 We're considering going all in on Crossplane, and in that context I started thinking about idempotency. Crossplane is obviously a controller that works to reconcile the current state to the desired state, but how does this work in a disaster recovery scenario? Imagine you have a Kubernetes cluster A that has literally exploded 💥🙊 and you need to spin up a new cluster B. You had provisioned a lot of infra (SQLInstances, S3 buckets..) using Crossplane from cluster A, and now you are deploying the same Crossplane Custom Resources onto cluster B. This scenario is not a backup-restore, we're just applying the same Crossplane resources on a new empty cluster. Will Crossplane be able to recover the links between the previously provisioned cloud resources and the newly deployed Crossplane Custom Resources based on their names and locations? Or will you potentially end up with it deploying new set of resources and not retaining the state? Will you be forced to keep backups of the Managed Resources and so on? Anyone have any real-life experiences with a disaster recovery scenario like this? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Good question @eliihen! Backup/restore is the first line of defense for disaster recovery, but If you don't have a backup to easily restore your control plane from, you can instead import existing resources into Crossplane as described in the docs: Crossplane will discover those resources and then start reconciling them again for you - so yes, it's idempotent in that sense. Note that this can be made more streamlined as captured in issue #4141, with some bonus recent discussion that may also be interesting to you: |
Beta Was this translation helpful? Give feedback.
Good question @eliihen! Backup/restore is the first line of defense for disaster recovery, but If you don't have a backup to easily restore your control plane from, you can instead import existing resources into Crossplane as described in the docs:
https://docs.crossplane.io/latest/guides/import-existing-resources/
Crossplane will discover those resources and then start reconciling them again for you - so yes, it's idempotent in that sense.
Note that this can be made more streamlined as captured in issue #4141, with some bonus recent discussion that may also be interesting to you:
#4141 (comment)