Table of Contents
Kubernetes(K8s) 완전 삭제하는 방법
Pod, Deployment, Service 삭제
kubectl get namespace
kubectl delete all --all --namespace=default
kubectl delete namespace <namespace_name>
시스템 초기화
sudo kubeadm reset
네트워크 초기화
sudo iptables -F && sudo iptables -t nat -F && sudo iptables -t mangle -F && sudo iptables -X
패키지 삭제
sudo apt-get purge kubeadm kubectl kubelet kubernetes-cni kube*
sudo apt-get autoremove
디렉토리 삭제
sudo rm -rf /etc/kubernetes /var/lib/etcd /var/lib/kubelet /etc/cni /opt/cni
도커 삭제
sudo docker ps -a
sudo docker stop $(sudo docker ps -a -q)
sudo docker rm $(sudo docker ps -a -q)
sudo docker images
sudo docker rmi $(sudo docker images -q)
reboot
sudo reboot