重置Kubernetes

作者: 王勇1024 | 来源:发表于2019-03-22 15:27 被阅读0次
    $ sudo 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
    [reset] Reading configuration from the cluster...
    [reset] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
    [reset] stopping the kubelet service
    [reset] unmounting mounted directories in "/var/lib/kubelet"
    [reset] deleting contents of stateful directories: [/var/lib/etcd /var/lib/kubelet /etc/cni/net.d /var/lib/dockershim /var/run/kubernetes]
    [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]
    
    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.
    For example:
    iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X
    
    If your cluster was setup to utilize IPVS, run ipvsadm --clear (or similar)
    to reset your system's IPVS tables.
    

    重置iptables

    iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X
    sysctl net.bridge.bridge-nf-call-iptables=1
    

    手动执行以下命令来清楚对应的残余网卡信息:

    sudo ip link del cni0
    sudo ip link del flannel.1
    

    相关文章

      网友评论

        本文标题:重置Kubernetes

        本文链接:https://www.haomeiwen.com/subject/afcrvqtx.html