<p>Is it possible to get a list of pods that have status <code>Running</code> from <code>kubectl</code>?</p>

<p>Using an external command it would be:</p>

<p><code>kubectl get pods | grep Running</code></p>

<p>Can I ask this from <code>kubectl</code> directly instead of string matching with grep or awk?</p>

<p>You can use a golang template: 
<code>kubectl get pods --all-namespaces -o go-template --template '{{range .items}}{{if eq (.status.phase) ("Running")}}{{.metadata.name}}{{"\n"}}{{end}}{{end}}'
</code> 
Of course <code>{{.metadata.name}}</code> can be replaced or extended with any informations you need.</p>
