Skip to content

Instantly share code, notes, and snippets.

@ognjen011
Forked from PhilipSchmid/rke2-node-cleanup.md
Created June 15, 2022 22:26
Show Gist options
  • Save ognjen011/e331987ab28a4aba836bae2cf16fba5e to your computer and use it in GitHub Desktop.
Save ognjen011/e331987ab28a4aba836bae2cf16fba5e 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