Following "kubeadm reset" command can be executed on Master node to destroy/delete existing Kubernetes Cluster.
#kubeadm reset
Below is sample output.
[root@primary ~]# kubeadm reset
[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
W0322 23:10:23.270636 6143 removeetcdmember.go:79] [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"
[reset] Deleting contents of config directories: [/etc/kubernetes/manifests /etc/kubernetes/pki]
[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/etcd /var/lib/kubelet /var/lib/dockershim /var/run/kubernetes /var/lib/cni]
If you wish to reset iptables, you must do so manually by using the "iptables" command.
to reset your system's IPVS tables.
Please, check the contents of the $HOME/.kube/config file.
Products to which Article Applies
Search Keywords: Kubernetes k8s kube kubeadm delete deleting destroy destroying existing current cluster how to created command commands devops
Article Author: Tarun Boyella
No comments:
Post a Comment