New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support graceful kube-apiserver shutdown as part of "kubeadm reset" to better support removing control plane nodes from a cluster #2978
Comments
yes, reset is intended to stop all running containers on a node and clean it up.
based on demand, my take right now would be that users who want the graceful shutdown can prepare the node using any means necessary (i.e. we don't need to apply this change to "reset") let's see if others have any comments on this topic. |
https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-reset/ is quite simple now. I prefer to add some documents about best practise of removing a control-plane in HA in https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/high-availability/.
+1 |
With current process, with Azure LB probes running every 5 seconds, before we shut down a machine, we run |
it seems that we don't have agreement to add this change to reset, (new task page) @invidian |
Sounds good I think. Let me open a PR. |
To address kubernetes/kubeadm#2978. Co-authored-by: Lubomir I. Ivanov <neolit123@gmail.com> Co-authored-by: Tim Bannister <tim@scalefactory.com>
To address kubernetes/kubeadm#2978. Co-authored-by: Lubomir I. Ivanov <neolit123@gmail.com> Co-authored-by: Tim Bannister <tim@scalefactory.com>
Right now,
kubeadm
providesreset
subcommand, which removes related Kubernetes control plane artifacts from a machine (among other things), but there is no specific documentation on how to remove control plane nodes from a cluster. One may assume thatkubeadm reset
could be suitable for this task, as it also for example attempts to remove reset machine from cluster's etcd cluster.If
kubeadm reset
is intended to be used for control plane nodes removal, it could do a better job at gracefully shutting down kube-apiserver itself, as it is done with etcd member, making it better for use in production environments.kube-apiserver itself supports graceful shutdown via flags like
--shutdown-delay-duration
,--shutdown-send-retry-after
,--shutdown-watch-termination-grace-period duration
, so when kube-apiserver receives termination signal,/readyz
probes will start responding with 500 error, which can be used as a trigger for load balancers to remove a given machine from the load balancing pool.However, using those flags with
kubeadm reset
is currently not trivial, as at least one way to work with it is the following:/etc/kubernetes/manifests/kube-apiserver.yaml
file e.g. to remove all command arguments from kube-apiserver container to trigger graceful shutdown and prevent kube-apiserver from starting again.kubeadm reset
.Perhaps kubeadm could do the patching and waiting part?
The text was updated successfully, but these errors were encountered: