<p>I have a kubernetes cluster perfectly working fine. I use below command to get the status of all the pods running in my namespace <code>dataspace</code></p>

<pre><code>kubectl get pods -n dataspace -o wide | sort -k7
</code></pre>

<p>Above command gives me the output with below columns.</p>

<pre><code>NAME               READY     STATUS              RESTARTS   AGE       IP            NODE
deployment-qw3ed   3/3       Running             3          3d        10.38.0.10    MACHINE01
</code></pre>

<p>Can we adjust above command so that the output looks like below. <code>NODE</code> column should  come after the <code>STATUS</code>:</p>

<pre><code>NAME               READY     STATUS     NODE         RESTARTS   AGE       IP            
deployment-qw3ed   3/3       Running    MACHINE01    3          3d        10.38.0.10    
</code></pre>

<p>You can re-arrange the output with <code>awk</code> which loses the pretty column separation but you can then make it pretty again with <code>column</code>:</p>

<p><code>kubectl get pods -n dataspace  -o wide | sort -k7 | awk '{ print $1, $2, $3, $7, $4, $5, $6}' | column -t</code></p>
