I'm working on node automatic registration and self removal from my rancher custom rke2 cluster and there appears to be some book keeping issues and I would like to know the proper way to do this. My handler works great for reboots, but for node removal and replacement I have some issues.
On planned node termination (scale-down) I am draining the node and then removing the rancher components using the uninstall script provided (rke-uninstall.sh). Then I use kubectl to delete the node from the cluster before deallocating the VM. This works fine, but in the rancher cluster management view I still see the node as "node not found".
Is there a means to properly remove the node entirely from the system?