Skip to content

Commit e1c7d9e

Browse files
authored
Merge pull request #45146 from invidian/patch-1
kubeadm-reset.md: add instruction about graceful shutdown
2 parents 75ad0a2 + 1f7291f commit e1c7d9e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ etcdctl del "" --prefix
3434

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

37+
### Graceful kube-apiserver shutdown
38+
39+
If you have your `kube-apiserver` configured with the `--shutdown-delay-duration` flag,
40+
you can run the following commands to attempt a graceful shutdown for the running API server Pod,
41+
before you run `kubeadm reset`:
42+
43+
```bash
44+
yq eval -i '.spec.containers[0].command = []' /etc/kubernetes/manifests/kube-apiserver.yaml
45+
timeout 60 sh -c 'while pgrep kube-apiserver >/dev/null; do sleep 1; done' || true
46+
```
47+
3748
## {{% heading "whatsnext" %}}
3849

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

0 commit comments

Comments
 (0)