<p>I use <code>kubectl exec -it</code> for logging into a single Kubernetes pod.</p>
<p>Is there any way to log in to multiple pods in a cluster, at the same time with a single command (just like <code>csshX</code>)?</p>

Sushovan Mishra
<p>There is a plugin that could help you with this. It's called <a href="https://github.com/predatorray/kubectl-tmux-exec" rel="nofollow noreferrer">kubectl-tmux-exec</a>:</p>
<blockquote>
<p>A kubectl plugin that controls multiple pods simultaneously using
<a href="https://github.com/tmux/tmux" rel="nofollow noreferrer">Tmux</a>.</p>
<p>It is to <code>kubectl exec</code> as <code>csshX</code> or <code>pssh</code> is to <code>ssh</code>.</p>
<p>Instead of exec bash into multiple pod's containers one-at-a-time,
like <code>kubectl exec pod{N} /bin/bash</code>.</p>
<p>You can now use</p>
<pre><code>kubectl tmux-exec -l app=nginx /bin/bash
</code></pre>
</blockquote>
<p>All necessary details regarding <a href="https://github.com/predatorray/kubectl-tmux-exec#installation" rel="nofollow noreferrer">Installation</a> and <a href="https://github.com/predatorray/kubectl-tmux-exec#usage" rel="nofollow noreferrer">Usage</a> can be found in the linked docs.</p>
