<p>I formed a k8s cluster with 5 nodes.
I want to run a command on all nodes which equals:</p>

<p>k8s-node1: yum update
k8s-node2: yum update
k8s-node3: yum update
k8s-node4: yum update
k8s-node5: yum update</p>

<p>How to achieve this?</p>

蔡中文
<p>Just as  cookiedough mentions. Your question is not Kubernetes related but rather Linux server administration in this case it also should not be asked on StackOverflow as it is for programming related topics.</p>

<p>You can find this question has been asked and answered <a href="https://unix.stackexchange.com/questions/19008/automatically-run-commands-over-ssh-on-many-servers">here</a>. And in similar cases where there is a need to run command or update on multiple machines.
Just making this short you can use lots of tools like ansible, pssh or some script etc. </p>

<p>In case of existing pods on the Node and having a specific need to reboot the Node (for example kernel upgrade, libc upgrade etc.) you can read about this scenario in official documentation - <a href="https://kubernetes.io/docs/tasks/administer-cluster/cluster-management/#maintenance-on-a-node" rel="nofollow noreferrer">Maintenance on a Node.</a></p>
