cnrancher / autok3s

Run K3s Everywhere
https://www.suse.com
Apache License 2.0
741 stars 76 forks source link

[BUG] When deleting the cluster in autok3s, the data directory defined by --data-dir was not deleted #640

Closed jinjianming closed 10 months ago

jinjianming commented 10 months ago
mount |grep kubelet
tmpfs on /work/lib/rancher/k3s/kubelet/pods/fc3e5ab8-b3d3-417e-b605-8c5532c69011/volumes/kubernetes.io~secret/config type tmpfs (rw,relatime)
tmpfs on /work/lib/rancher/k3s/kubelet/pods/fc3e5ab8-b3d3-417e-b605-8c5532c69011/volumes/kubernetes.io~secret/js-loki-stack-promtail-token-9fz8v type tmpfs (rw,relatime)
orangedeng commented 10 months ago

Seems like you are not using the default data-dir to run k3s. In the k3s-uninstall.sh script, it only do unmount to the default data-dir path.

Because the data-dir parameter can be changed in runtime, k3s uninstall won't respect to the current configuration and just unmount the default path.

So I don't think this is a bug for autok3s. You can raise an issue in https://github.com/k3s-io/k3s for more information.

orangedeng commented 10 months ago

Feel free to re-open this for further discussion.