GithubHelp home page GithubHelp logo

Comments (5)

mrajashree avatar mrajashree commented on May 17, 2024

I think this will be solved by including the Backup-restore operator CRDs in the resourceSet. Will check this and update the resourceset accordingly
This is not needed

from backup-restore-operator.

mrajashree avatar mrajashree commented on May 17, 2024

The main reason behind "Unauthorized" errors is the service account tied to the pod.
We configure the operator pod to use the serviceaccount that has cluster-admin role. When this service account is created, k8s also creates a secret associated with it and mounts it in the pod. During restore, since prune is enabled by default, this secret gets deleted.
So if we restore with prune=false we shouldn't see this error. But that leads to the duplicate "Default" and "System" projects issue

from backup-restore-operator.

mrajashree avatar mrajashree commented on May 17, 2024

The following steps should be used for restoring to a new cluster for the DR use case, which will ensure the operator pod retains its serviceaccount and associated secret

  1. Install the backup-restore-operator on the new cluster using Helm CLI
  2. Restore from backup AND set prune=false
  3. This restore also adds in the secret associated with the helm release of rancher from cluster 1. So run helm upgrade instead of helm install and bring up rancher.

Discussed this offline with @cloudnautique and there is no need to bring up rancher first on the new cluster and then launch the operator from dashboard, if we're restoring from backup, it makes sense for the operator to bring up the entire setup. Will test these steps once again

from backup-restore-operator.

mrajashree avatar mrajashree commented on May 17, 2024

Steps

  1. helm install backup-restore-operator-crd rancherchart/backup-restore-operator-crd -n cattle-resources-system --create-namespace
  2. helm install backup-restore-operator rancherchart/backup-restore-operator -n cattle-resources-system
  3. kubectl apply -f migrationResource.yaml where prune=false
    Helm3 stores chart release info as a secret, so rancher chart from cluster1 is stored as secret in cattle-system namespace, which gets backed up and created on the new cluster due to restore. So now no need to reinstall rancher, we just need to upgrade it
  4. (If needed, also follow steps to install cert-manager from rancher HA install docs)
  5. helm upgrade rancher rancher-alpha/rancher --version 2.5.0-alpha1 --namespace cattle-system --set hostname= --set rancherImageTag=master-head --set webhook.enabled=false

should work with above steps, moving to test as no actual change is needed in the operator or the chart

from backup-restore-operator.

sowmyav27 avatar sowmyav27 commented on May 17, 2024

Verified on master-head - commit id: ad697207

  • Deploy rancher HA setup.
  • Deploy a couple of user clusters.
  • deploy backup restore chart/app in the local cluster.
  • Take a backup b1 which is saved
  • Delete the local cluster nodes for this HA setup
  • Deploy a new RKE cluster (3 nodes all roles). Add this node to the target groups/load balancer.
  • Install the backup-restore-operator chart on the new cluster using Helm CLI
helm repo add rancherchart https://charts.rancher.io
helm repo update
helm install backup-restore-operator-crd rancherchart/backup-restore-operator-crd -n cattle-resources-system --create-namespace
helm install backup-restore-operator rancherchart/backup-restore-operator -n cattle-resources-system

from backup-restore-operator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.