<p>When I do</p>

<pre><code>kubectl get pods -A
</code></pre>

<p>I get all pods, and I always have 17 pods that are not "apps", they belong to namespace <code>kube-system</code>. I would like to have an alias not to print them. </p>

<p>Is there a way to print all pods, excluding a namespace ?</p>

<p>You can accomplish this via <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/" rel="noreferrer">field selectors</a>:</p>

<pre><code>kubectl get pods -A --field-selector=metadata.namespace!=kube-system
</code></pre>

<p>Additionally, the field selector list can have multiple parameters, separated by <code>,</code> (comma literals), and use <code>==</code> or <code>!=</code> to specify additional criteria.</p>
