Hi,
There is a single command for reset completely k3s and recover the initial setup ?
FYI. https://github.com/rancher/k3s#uninstalling-server
Many thanks, I knew the uninstall command! I ask if exist something able to reset all without uninstall all! But ok uninstall can be a solution for sure!
you can stop k3s and remove /var/lib/rancher directory, I assume that is what you mean reset
you can stop k3s and remove /var/lib/rancher directory, I assume that is what you mean reset
According to the uninstall script, multiple directories need to be cleaned up: https://github.com/rancher/k3s/blob/03885fc38532afcb944c892121ffe96b201fc020/install.sh#L407-L449
/etc/rancher/k3s/var/lib/rancher/k3sI agree, having these cleaned up using a handy k3s reset command would be nice.
/usr/local/bin/k3s-killall.sh
Above command did the work for me.
Yes, what @mkannekanti suggested will work assuming you installed via the curl script you will have the uninstall script and killall script at /usr/local/bin.
However, I think it would be great if there was some way we could also handle this if a user decides to run k3s without using the curl script. For example if they are running the k3s binary (such as downloading it directly from GitHub) you can kill the k3s process but everything stays running (containerd, traefik, etc, etc).
So, I created a separate issue to track this here: https://github.com/rancher/k3s/issues/841
I'm going to close this issue in favor of that issue and the fact that when using the curl script you can just use the k3s-killall.sh and k3s-uninstall.sh scripts to stop/remove k3s completely.
Most helpful comment
According to the uninstall script, multiple directories need to be cleaned up: https://github.com/rancher/k3s/blob/03885fc38532afcb944c892121ffe96b201fc020/install.sh#L407-L449
/etc/rancher/k3s/var/lib/rancher/k3sI agree, having these cleaned up using a handy
k3s resetcommand would be nice.