# kubeadm 제거
vagrant@k-node3:~$ sudo kubeadm reset
[reset] Deleting files: [/etc/kubernetes/admin.conf /etc/kubernetes/kubelet.conf
/etc/kubernetes/bootstrap-kubelet.conf /etc/kubernetes/controller-manager.conf /etc/kubernetes/scheduler.conf]
[reset] Deleting contents of stateful directories: [/var/lib/kubelet /var/lib/dockershim /var/run/kubernetes /var/lib/cni]
The reset process does not clean CNI configuration. To do so, you must remove /etc/cni/net.d
Please, check the contents of the $HOME/.kube/config file.
# 설정파일들 확인 후 제거
vagrant@k-node3:~$ sudo ls -l /var/lib/kubelet/
total 0
vagrant@k-node3:~$ sudo ls -l /etc/kubernetes/
total 8
drwxr-xr-x 2 root root 4096 Jul 6 07:36 manifests
drwxr-xr-x 2 root root 4096 Jul 7 03:17 pki
vagrant@k-node3:~$ sudo rm -rf /etc/kubernetes/
vagrant@k-node3:~$ sudo rm -rf /etc/cni/net.d
vagrant@k-node3:~$ sudo rm -rf ~/.kube
# kubelet kubectl 제거
vagrant@k-node3:~$ sudo apt remove kubeadm kubelet kubectl
# control-plane 에서 node3 삭제
vagrant@k-control:~$ kubectl delete node k-node3
node "k-node3" deleted
# 확인
vagrant@k-control:~$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
k-control Ready master 19h v1.19.12
k-node1 Ready <none> 19h v1.19.12
k-node2 Ready <none> 19h v1.19.12
'클라우드 > 쿠버네티스(Kubernetes)' 카테고리의 다른 글
쿠버네티스 Kubernetes API 1 (0) | 2021.07.07 |
---|---|
쿠버네티스 Kubernetes YAML (0) | 2021.07.07 |
쿠버네티스 Kubernetes 버전 업그레이드 2 (0) | 2021.07.07 |
쿠버네티스 Kubernetes 버전 업그레이드 1 (0) | 2021.07.07 |
쿠버네티스 Kubernetes 애드온 (0) | 2021.07.07 |