From 51d733f418ab2cb29de0b9effa1d3bbd8254d342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20K=C3=A4ldstr=C3=B6m?= Date: Sun, 4 Dec 2016 19:50:52 +0200 Subject: [PATCH] Remove the cni directory when resetting; otherwise kubelet can pick up the wrong config on the next kubeadm init run --- cmd/kubeadm/app/cmd/reset.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/kubeadm/app/cmd/reset.go b/cmd/kubeadm/app/cmd/reset.go index c2325b789db..86fb8526869 100644 --- a/cmd/kubeadm/app/cmd/reset.go +++ b/cmd/kubeadm/app/cmd/reset.go @@ -136,7 +136,7 @@ func (r *Reset) Run(out io.Writer) error { fmt.Printf("failed to unmount directories in /var/lib/kubelet, %s", string(umountOutputBytes)) } - dirsToClean := []string{"/var/lib/kubelet"} + dirsToClean := []string{"/var/lib/kubelet", "/etc/cni/net.d"} // Only clear etcd data when the etcd manifest is found. In case it is not found, we must assume that the user // provided external etcd endpoints. In that case, it is his own responsibility to reset etcd