Skip to content

Commit

Permalink
kubeadm-reset: add notes about more manual cleanup steps
Browse files Browse the repository at this point in the history
  • Loading branch information
neolit123 committed Jan 15, 2025
1 parent 0aad8f5 commit d0e97a5
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions content/en/docs/reference/setup-tools/kubeadm/kubeadm-reset.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,36 @@ etcdctl del "" --prefix

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

### CNI configuration cleanup

CNI plugins use the directory `/etc/cni/net.d` to store their configuration.
The `kubeadm reset` command does not cleanup that directory. Backup the directory if needed.
Then to remove it execute the following command:

```bash
sudo rm -rf /etc/cni/net.d
```

### Network traffic rules cleanup

The `kubeadm reset` command does not clean any iptables, nftables or IPVS rules applied
to the host by kube-proxy. If you wish to perform this cleanup, you can use the same
kube-proxy container which was used in your cluster and the `--cleanup` flag of the
kube-proxy binary:

```bash
docker run --privileged registry.k8s.io/kube-proxy:v{{< skew currentVersion >}} sh -c "kube-proxy --cleanup && echo DONE"
```

The output of the above command should print `DONE` at the end.
Instead of `docker` you can use an alternative tool such as `nerdctl` or `crictl`.

### Cleanup of kubeconfig files

The `kubeadm reset` command does not clean kubeconfig files that you manually copied to
`$HOME/.kube/config`. Please, check the contents of the `$HOME/.kube/config` file. Backup
the file and remove it, if needed.

### Graceful kube-apiserver shutdown

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

0 comments on commit d0e97a5

Please sign in to comment.