Skip to content

Commit

Permalink
Merge pull request #608 from Oats87/issues/rke2/597-docs
Browse files Browse the repository at this point in the history
Enhance the uninstall docs
  • Loading branch information
Oats87 authored Dec 15, 2020
2 parents c1e2c48 + 0267d33 commit 328b729
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 26 deletions.
71 changes: 45 additions & 26 deletions docs/install/uninstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 also call 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
```
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ plugins:
markdown_extensions:
- codehilite
- admonition
- pymdownx.tabbed
- pymdownx.superfences
- toc:
permalink: true
nav:
Expand Down

0 comments on commit 328b729

Please sign in to comment.