Skip to content

Instantly share code, notes, and snippets.

@ZouhairCharef
Forked from PhilipSchmid/rke2-node-cleanup.md
Created February 6, 2023 14:44
Show Gist options
  • Save ZouhairCharef/4d2e61bc74c0157eddc56aa3e6be4554 to your computer and use it in GitHub Desktop.
Save ZouhairCharef/4d2e61bc74c0157eddc56aa3e6be4554 to your computer and use it in GitHub Desktop.
RKE2 node cleanup statements to clean up a node after a failed Rancher custom cluster installation try

RKE2 Node Cleanup To reset a RKE2 node, run the following commands:

# rke2-(server|agent) related
rke2-killall.sh
rke2-uninstall.sh
# rancher-system-agent related
systemctl stop rancher-system-agent.service
systemctl disable rancher-system-agent.service
rm -f /etc/systemd/system/rancher-system-agent.service
rm -f /etc/systemd/system/rancher-system-agent.env
systemctl daemon-reload
rm -f /usr/local/bin/rancher-system-agent
rm -rf /etc/rancher/
rm -rf /var/lib/rancher/
rm -rf /usr/local/bin/rke2*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment