Skip to content

Instantly share code, notes, and snippets.

@PhilipSchmid
Last active April 25, 2024 23:22
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save PhilipSchmid/cda538714c10a1e8d3fc759dd8fc74a5 to your computer and use it in GitHub Desktop.
Save PhilipSchmid/cda538714c10a1e8d3fc759dd8fc74a5 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