<p>I have a k8s cluster with 3 nodes.
With kubectl command i enter in a pod shell and make some file editing:</p>
<pre><code>kubectl exec --stdin --tty &lt;pod-name&gt; -- /bin/bash
</code></pre>
<p>at this point i have one pod wit correct editing and other 2 replicas with old file.
My question is:
There is a kubectl commend for, starting from a specific pod, overwrite current replicas in cluster for create n equals pods?</p>
<p>Hope to be clear</p>
<p>So many thanks in advance
Manuel</p>

Manuel Santi
<p>You can use a kubectl plugin called: <a href="https://github.com/predatorray/kubectl-tmux-exec" rel="nofollow noreferrer">kubectl-tmux-exec</a>.<br />
All information on how to install and use this plugin can be found on GitHub: <a href="https://github.com/predatorray/kubectl-tmux-exec#installation" rel="nofollow noreferrer">predatorray/kubectl-tmux-exec</a>.</p>
<p>As described in the <a href="https://github.com/predatorray/kubectl-tmux-exec/wiki/How-to-Install-Dependencies" rel="nofollow noreferrer">How to Install Dependencies</a> documentation.</p>
<blockquote>
<p>The plugin needs the following programs:</p>
<ul>
<li>gnu-getopt(1)</li>
<li>tmux(1)</li>
</ul>
</blockquote>
<hr />
<p>I've created a simple example to illustrate you how it works.</p>
<p>Suppose I have a <code>web</code> <code>Deployment</code> and want to create a <code>sample-file</code> file inside all (3) replicas.</p>
<pre><code>$ kubectl get deployment,pods --show-labels
NAME                  READY   UP-TO-DATE   AVAILABLE   AGE   LABELS
deployment.apps/web   3/3     3            3           19m   app=web

NAME                      READY   STATUS    RESTARTS   AGE   LABELS
pod/web-96d5df5c8-5gn8x   1/1     Running   0          19m   app=web,pod-template-hash=96d5df5c8
pod/web-96d5df5c8-95r4c   1/1     Running   0          19m   app=web,pod-template-hash=96d5df5c8
pod/web-96d5df5c8-wc9k5   1/1     Running   0          19m   app=web,pod-template-hash=96d5df5c8
</code></pre>
<p>I have the <code>kubectl-tmux_exec</code> plugin installed, so I can use it:</p>
<pre><code>$ kubectl plugin list
The following compatible plugins are available:

/usr/local/bin/kubectl-tmux_exec


$ kubectl tmux-exec -l app=web bash
</code></pre>
<p>After running the above command, Tmux will be opened and we can modify multiple Pods simultaneously:</p>
<p><a href="https://i.stack.imgur.com/AzO5B.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AzO5B.png" alt="enter image description here" /></a></p>
