<p>In my professional environment it is common for "completed" pods to outnumber active ones and they often clutter the output of <code>kubectl get pods</code> like so:</p>

<pre><code>$ kubectl get pods
finished-pod-38163    0/1 Completed    2m
errored-pod-83023     0/1 Error        2m
running-pod-20899     1/1 Running      2m
</code></pre>

<p>I can filter them out using <code>--show-all=false</code>:</p>

<pre><code>$ kubectl get pods --show-all=false
running-pod-20899     1/1 Running      2m
</code></pre>

<p>However I would prefer not to have to type out <code>--show-all=false</code> every time I want to see my running pods. Is it possible to configure <code>kubectl</code> to <em>disable</em> <code>--show-all</code> <em>by default</em> rather than having it enabled by default?</p>

<p>From <code>kubectl get pods --help</code>:</p>

<pre><code>-a, --show-all=true: When printing, show all resources (default show all pods
                     including terminated one.)
</code></pre>

<p>I know I could create some shell alias <code>kgetpo</code>, but this would remove support for tab-completion so I'd prefer native solutions if they exist.</p>

Cory Klein
<p>You can try something like this:</p>
<pre><code>kubectl get pods --field-selector=status.phase==Running
</code></pre>
