Skip to content

Commit

Permalink
kubeadm-reset.md: add instruction about graceful shutdown
Browse files Browse the repository at this point in the history
To address kubernetes/kubeadm#2978.

Co-authored-by: Lubomir I. Ivanov <neolit123@gmail.com>
Co-authored-by: Tim Bannister <tim@scalefactory.com>
  • Loading branch information
3 people committed Feb 19, 2024
1 parent 75ad0a2 commit 1f7291f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions content/en/docs/reference/setup-tools/kubeadm/kubeadm-reset.md
Expand Up @@ -34,6 +34,17 @@ etcdctl del "" --prefix

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

### Graceful kube-apiserver shutdown

If you have your `kube-apiserver` configured with the `--shutdown-delay-duration` flag,
you can run the following commands to attempt a graceful shutdown for the running API server Pod,
before you run `kubeadm reset`:

```bash
yq eval -i '.spec.containers[0].command = []' /etc/kubernetes/manifests/kube-apiserver.yaml
timeout 60 sh -c 'while pgrep kube-apiserver >/dev/null; do sleep 1; done' || true
```

## {{% heading "whatsnext" %}}

* [kubeadm init](/docs/reference/setup-tools/kubeadm/kubeadm-init/) to bootstrap a Kubernetes control-plane node
Expand Down

0 comments on commit 1f7291f

Please sign in to comment.