Skip to content

Commit dbeb24d

Browse files
committed
kubeadm-reset: add notes about more manual cleanup steps
1 parent 0aad8f5 commit dbeb24d

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

content/en/docs/reference/setup-tools/kubeadm/kubeadm-reset.md

+30
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,36 @@ etcdctl del "" --prefix
3434

3535
See the [etcd documentation](https://github.com/coreos/etcd/tree/master/etcdctl) for more information.
3636

37+
### CNI configuration cleanup
38+
39+
CNI plugins use the directory `/etc/cni/net.d` to store their configuration.
40+
The `kubeadm reset` command does not cleanup that directory. Backup the directory if needed.
41+
Then to remove it, execute the following command:
42+
43+
```bash
44+
sudo rm -rf /etc/cni/net.d
45+
```
46+
47+
### Network traffic rules cleanup
48+
49+
The `kubeadm reset` command does not clean any iptables, nftables or IPVS rules applied
50+
to the host by kube-proxy. If you wish to perform this cleanup, you can use the same
51+
kube-proxy container which was used in your cluster and the `--cleanup` flag of the
52+
kube-proxy binary:
53+
54+
```bash
55+
docker run --privileged --rm registry.k8s.io/kube-proxy:v{{< skew currentPatchVersion >}} sh -c "kube-proxy --cleanup && echo DONE"
56+
```
57+
58+
The output of the above command should print `DONE` at the end.
59+
Instead of `docker` you can use an alternative tool such as `nerdctl` or `crictl`.
60+
61+
### Cleanup of kubeconfig files
62+
63+
The `kubeadm reset` command does not clean kubeconfig files that you manually copied to
64+
`$HOME/.kube/config`. Please, check the contents of the `$HOME/.kube/config` file. Backup
65+
the file and remove it, if needed.
66+
3767
### Graceful kube-apiserver shutdown
3868

3969
If you have your `kube-apiserver` configured with the `--shutdown-delay-duration` flag,

0 commit comments

Comments
 (0)