darxkies / k8s-tew

Kubernetes - The Easier Way
GNU General Public License v3.0
307 stars 38 forks source link

Uninstall k8s-tew completly #21

Closed ghost closed 4 years ago

ghost commented 4 years ago

Recently I've tried the k8s-tew project following the steps described. But now I'd like to completly remove from my system everything. How to proceed? What steps are involved to remove everything?

darxkies commented 4 years ago

How did you install it? On the host system? Or on a remote server?

ghost commented 4 years ago

I installed it from this guide: https://itnext.io/kubernetes-on-bare-metal-batteries-included-with-k8s-tew-b7df7d661443

On remote server (ubuntu server 18.04) Cheers

darxkies commented 4 years ago

You need to execute the following instructions as root:

systemctl stop k8s-tew

systemctl disable k8s-tew

reboot

rm -Rf /etc/systemd/system/k8s-tew.service /etc/systemd/system/multi-user.target.wants/k8s-tew.service /etc/k8s-tew /etc/bash_completion.d/k8s-tew.bash-completion /etc/profile.d/k8s-tew.sh /var/k8s-tew /var/log/k8s-tew /var/lib/k8s-tew /opt/k8s-tew /run/k8s-tew /run/containerd /opt/containerd /var/log/pods /var/lib/kubelet

ghost commented 4 years ago

Cheers! I'll try it later

eddieparker commented 4 years ago

I followed these instructions but now I have a rogue KUBECONFIG=/etc/k8s-tew/k8s/kubeconfig/admin.kubeconfig everytime I log in.

Do you know where this is set?

darxkies commented 4 years ago

That is set in /etc/profile.d/k8s-tew.sh in the last line. But that file is removed with the rm shell command above. Try rebooting after the rm command. Afterwards the settings should be gone for good.