Home > Software design >  How to stop all API server instances properly?
How to stop all API server instances properly?

Time:06-27

I am trying to restore an etcd cluster.

The documentation states that we should stop all running api-server instances before attempting restoring etcd.

I have installed my cluster through kubeadm so my instances are running through static pods. How am I supposed to properly shut them down? Aside from removing temporarly removing the /etc/kubernetes/manifests/kube-apiserver.yaml file I don't know any other way. Is there any "cleaner" way?

CodePudding user response:

You can stop/restart kube-apiserver the same way you stopped etcd like "sudo systemctl stop kube-apiserver"

CodePudding user response:

As mentioned by you kube-apiserver is an static pod which is monitored by kubelet running on the master node. The kube-apiserver can brought down and stop the kubelet on that master node, do the etcd maintenance activity and restart the kubelet. after restarting the kubelet, it will bring back the kube-apiserver. As recommended by k8s documentation the restart of control manager and scheduler is also advised.

  • Related