Can we reboot the actual nodes using kubectl remotely?


We have a small cluster setup using kubeadm on 3 linux systems. Due to the amount of load we put in using scripts we run on nodes, there are some memory leaks and often need a reboot.

To schedule an automated reboot, I have setup a script to use kubectl and prepare cluster for shutdown using drain and cordon operations.

Now for the core part, i.e. to reboot the node, I was looking for options and just had this thought. Can’t we leverage kubernetes communication channel to reboot a node remotely? It would be much better than setting up the ssh keys and separate config to make a remote reboot operation.

I would appreciate any information related to the topic.



I really don’t know :-/

I’d have a look at plugins But not sure if they provide the functionality you need. There might be a road map somewhere, maybe :slight_smile:


The short answer is no. There are very few imperative commands in the API. You can run a pod that riggers reboots, if that helps.


Ok, thanks for the pointers, will look at the plugins. :slight_smile:


Got it! That’s a great input, something local in the machine triggers the input based on some external event (i.e. pod spin up in this case). Thanks!