Uninstall MSR

The method used to uninstall MSR differs based on the orchestrator employed to manage your MSR instance.

Kubernetes deployments

To prevent data loss, uninstalling MSR does not delete persistent volumes (PVs) or certificate secrets.

To uninstall MSR using the MSR Operator:

  1. Run the following command to uninstall MSR:

    kubectl delete --ignore-not-found=true -f msr-operator.yaml
    
  2. List the persistent volumes claims (PVCs):

    kubectl get pvc
    
  3. Delete the PVCs:

    kubectl delete pvc <pvcs>
    

    Note

    The spec.PersistentVolumeClaimRetentionPolicy field in the custom resource manifest differs from the PersistentVolume Reclaim policy in Kubernetes. The MSR Operator PersistentVolumeClaim Retention policy can accept either of the following values:

    • retain: When the MSR custom resource is deleted, the PVCs used by MSR are retained (default).

    • delete: Deleting the MSR custom resource results in the automatic deletion of the PVCs used by MSR.

    For more information on deleting and retaining PVs, refer to the official Kubernetes documentation.

  4. Delete the secrets associated with your MSR deployment:

    kubectl delete secret -l app.kubernetes.io/name=msr
    

To uninstall MSR using a Helm chart:

  1. Run the following Helm command:

    helm uninstall <release-name>
    
  2. Remove persistent volumes and certificate secrets.

Swarm deployments

  1. SSH into a manager node on the Swarm cluster in which MSR is running.

  2. Uninstall MSR:

    docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock \
      registry.mirantis.com/msr/msr-installer:<msr version> \
      uninstall
    

    By default, the uninstaller does not delete the data associated with your MSR deployment. To delete that data, you must include the --destroy flag with the uninstall command.