From 66e4cb7a973100b9c207b971b5415e04aa328494 Mon Sep 17 00:00:00 2001 From: Chris Kim Date: Mon, 14 Dec 2020 18:32:47 -0800 Subject: [PATCH 1/2] Enhance the uninstall docs Signed-off-by: Chris Kim --- docs/install/uninstall.md | 71 +++++++++++++++++++++++++-------------- mkdocs.yml | 2 ++ 2 files changed, 47 insertions(+), 26 deletions(-) diff --git a/docs/install/uninstall.md b/docs/install/uninstall.md index d67a9e5582..366982b6c3 100644 --- a/docs/install/uninstall.md +++ b/docs/install/uninstall.md @@ -4,43 +4,62 @@ title: Uninstall # Uninstall -This document explains how to fully uninstall RKE2 on a node, based on the installation method that was used. +> **Note:** Uninstalling RKE2 deletes the cluster data and all of the scripts. -## Tarball Method +Depending on the method used to install RKE2, the uninstallation process varies. -To uninstall RKE2 from your system, simply run the command below. This will shutdown process, remove the RKE2 binary, and clean up files used by RKE2. +## RPM Method +To uninstall RKE2 installed via the RPM method from your system, simply run the commands corresponding to the version of RKE2 you have installed. This will shutdown RKE2 process, remove the RKE2 RPMs, and clean up files used by RKE2. -```bash -rke2-uninstall.sh -``` +=== "RKE2 v1.18.13+rke2r1 and newer" + Starting with RKE2 `v1.18.13+rke2r1`, the bundled `rke2-uninstall.sh` script will remove the corresponding RPM packages during the uninstall process. Simply run the following command: -## RPM Method + ```bash + /usr/bin/rke2-uninstall.sh + ``` -To uninstll RKE2 from your system, if installed with from RPM, a few commands need to be ran. +=== "RKE2 Prior to v1.18.13+rke2r1" + If you are running a version of RKE2 that is older than `v1.18.13+rke2r1`, you will need to manually remove the RKE2 RPMs after calling the `rke2-uninstall.sh` script. + + ```bash + /usr/bin/rke2-uninstall.sh + yum remove -y 'rke2-*' + rm -rf /run/k3s + ``` -> **Note:** RPM based installs currently do not install the rke2-uninstall.sh script. This is a known issue that will be addressed in a future release. This document instructs you on how to download and use the necessary scripts. +=== "RKE2 Prior to v1.18.11+rke2r1" + RPM based installs older than and including `v1.18.10+rke2r1` did not package the `rke2-uninstall.sh` script. These instructions provide guidance on how to download and use the necessary scripts. -```bash -yum remove -y 'rke2-*' -rm -rf /run/k3s -``` + First, remove the corresponding RKE2 packages and `/run/k3s` directory. -Once those commands are ran, the `rke2-uninstall.sh` and `rke2-killall.sh` scripts should be downloaded. These two scripts will stop any running containers and processes, clean up used processes, and ultimately remove RKE2 from the system. Run the commands below. + ```bash + yum remove -y 'rke2-*' + rm -rf /run/k3s + ``` -```bash -curl -sL https://raw.githubusercontent.com/rancher/rke2/488bab0f48b848e408ce399c32e7f5f73ce96129/bundle/bin/rke2-uninstall.sh --output rke2-uninstall.sh -chmod +x rke2-uninstall.sh -mv rke2-uninstall.sh /usr/local/bin -``` + Once those commands are run, the rke2-uninstall.sh and rke2-killall.sh scripts should be downloaded. These two scripts will stop any running containers and processes, clean up used processes, and ultimately remove RKE2 from the system. Run the commands below. -```bash -curl -sL https://raw.githubusercontent.com/rancher/rke2/488bab0f48b848e408ce399c32e7f5f73ce96129/bundle/bin/rke2-killall.sh --output rke2-killall.sh -chmod +x rke2-killall.sh -mv rke2-killall.sh /usr/local/bin -``` + ```bash + curl -sL https://raw.githubusercontent.com/rancher/rke2/488bab0f48b848e408ce399c32e7f5f73ce96129/bundle/bin/rke2-uninstall.sh --output rke2-uninstall.sh + chmod +x rke2-uninstall.sh + mv rke2-uninstall.sh /usr/local/bin + + curl -sL https://raw.githubusercontent.com/rancher/rke2/488bab0f48b848e408ce399c32e7f5f73ce96129/bundle/bin/rke2-killall.sh --output rke2-killall.sh + chmod +x rke2-killall.sh + mv rke2-killall.sh /usr/local/bin + + ``` + + Now run the rke2-uninstall.sh script. This will call also the rke2-killall.sh. + + ```bash + /usr/local/bin/rke2-uninstall.sh + ``` + +## Tarball Method -Now run the `rke2-uninstall.sh` script. This will call the `rke2-killall.sh` script which will +To uninstall RKE2 installed via the Tarball method from your system, simply run the command below. This will shutdown process, remove the RKE2 binary, and clean up files used by RKE2. ```bash -rke2-uninstall.sh +/usr/local/bin/rke2-uninstall.sh ``` diff --git a/mkdocs.yml b/mkdocs.yml index 6c2d425f1c..ce6c78b37b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -16,6 +16,8 @@ plugins: markdown_extensions: - codehilite - admonition +- pymdownx.tabbed +- pymdownx.superfences - toc: permalink: true nav: From 0267d339fdf1b7d03aca8e37d09dca629340b556 Mon Sep 17 00:00:00 2001 From: Chris Kim <30601846+Oats87@users.noreply.github.com> Date: Mon, 14 Dec 2020 19:53:18 -0800 Subject: [PATCH 2/2] Update docs/install/uninstall.md Signed-off-by: Chris Kim Co-authored-by: Brian Downs --- docs/install/uninstall.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/install/uninstall.md b/docs/install/uninstall.md index 366982b6c3..99481afc3c 100644 --- a/docs/install/uninstall.md +++ b/docs/install/uninstall.md @@ -50,7 +50,7 @@ To uninstall RKE2 installed via the RPM method from your system, simply run the ``` - Now run the rke2-uninstall.sh script. This will call also the rke2-killall.sh. + Now run the rke2-uninstall.sh script. This will also call the rke2-killall.sh. ```bash /usr/local/bin/rke2-uninstall.sh