kubeadm reset 실행 시 아래와 같은 경우 로그가 있는 경우 

root@kube-master-node:~# kubeadm reset
W1103 01:58:36.260832    3368 preflight.go:56] [reset] WARNING: Changes made to this host by 'kubeadm init' or 'kubeadm join' will be reverted.
[reset] Are you sure you want to proceed? [y/N]: y
[preflight] Running pre-flight checks
W1103 01:58:37.907191    3368 removeetcdmember.go:106] [reset] No kubeadm config, using etcd pod spec to get data directory
[reset] Stopping the kubelet service
[reset] Unmounting mounted directories in "/var/lib/kubelet"
W1103 01:58:49.601400    3368 cleanupnode.go:105] [reset] Failed to remove containers: failed to stop running pod 6b252a18cbc126dfa84ab65398a3fafd8c286fcee46aa4fad81cd1c6b4c2a9f4: rpc error: code = Unknown desc = failed to stop container "93f58c2fc0ce6a5914f62c94a9c2b4ce8d734e265c882fd3694a5b2e25face7d": failed to kill container "93f58c2fc0ce6a5914f62c94a9c2b4ce8d734e265c882fd3694a5b2e25face7d": unknown error after kill: runc did not terminate successfully: exit status 1: unable to signal init: permission denied
: unknown
[reset] Deleting contents of directories: [/etc/kubernetes/manifests /var/lib/kubelet /etc/kubernetes/pki]
[reset] Deleting files: [/etc/kubernetes/admin.conf /etc/kubernetes/super-admin.conf /etc/kubernetes/kubelet.conf /etc/kubernetes/bootstrap-kubelet.conf /etc/kubernetes/controller-manager.conf /etc/kubernetes/scheduler.conf]

The reset process does not clean CNI configuration. To do so, you must remove /etc/cni/net.d

The reset process does not reset or clean up iptables rules or IPVS tables.
If you wish to reset iptables, you must do so manually by using the "iptables" command.

If your cluster was setup to utilize IPVS, run ipvsadm --clear (or similar)
to reset your system's IPVS tables.

The reset process does not clean your kubeconfig files and you must remove them manually.
Please, check the contents of the $HOME/.kube/config file.
root@kube-master-node:~#

 

 

아래 명령어로 초기화 실행

root@kube-master-node:~# kubeadm reset --cri-socket unix:///run/containerd/containerd.sock -v 5
root@kube-master-node:~# kubeadm reset --cri-socket unix:///run/containerd/containerd.sock -v 5
I1103 02:01:20.182111    3547 reset.go:126] [reset] Could not obtain a client set from the kubeconfig file: /etc/kubernetes/admin.conf
W1103 02:01:20.182155    3547 preflight.go:56] [reset] WARNING: Changes made to this host by 'kubeadm init' or 'kubeadm join' will be reverted.
[reset] Are you sure you want to proceed? [y/N]: y
[preflight] Running pre-flight checks
I1103 02:01:22.840828    3547 removeetcdmember.go:60] [reset] Checking for etcd config
W1103 02:01:22.840847    3547 removeetcdmember.go:106] [reset] No kubeadm config, using etcd pod spec to get data directory
I1103 02:01:22.840896    3547 cleanupnode.go:65] [reset] Getting init system
[reset] Stopping the kubelet service
[reset] Unmounting mounted directories in "/var/lib/kubelet"
I1103 02:01:22.844032    3547 cleanupnode.go:103] [reset] Removing Kubernetes-managed containers
[reset] Deleting contents of directories: [/etc/kubernetes/manifests /var/lib/kubelet /etc/kubernetes/pki]
[reset] Deleting files: [/etc/kubernetes/admin.conf /etc/kubernetes/super-admin.conf /etc/kubernetes/kubelet.conf /etc/kubernetes/bootstrap-kubelet.conf /etc/kubernetes/controller-manager.conf /etc/kubernetes/scheduler.conf]

The reset process does not clean CNI configuration. To do so, you must remove /etc/cni/net.d

The reset process does not reset or clean up iptables rules or IPVS tables.
If you wish to reset iptables, you must do so manually by using the "iptables" command.

If your cluster was setup to utilize IPVS, run ipvsadm --clear (or similar)
to reset your system's IPVS tables.

The reset process does not clean your kubeconfig files and you must remove them manually.
Please, check the contents of the $HOME/.kube/config file.
root@kube-master-node:~#

'기술 노트 > kubernetes' 카테고리의 다른 글

kube init 재구성하는 방법  (0) 2024.11.03
pod가 terminating으로 남을 때  (0) 2024.11.02
node role label 변경  (0) 2024.10.31
minikube 설치하기  (0) 2023.09.25
macOS에서 kubernetes 설치하기  (0) 2023.09.25

+ Recent posts