<p>Is it possible to get a list of pods that are Running on matser from kubectl?</p>

<p>i have tried this </p>

<pre><code>kubectl get pods -o wide --sort-by="{.spec.nodeName}"
</code></pre>

<p>but this doesnt say whether the node is master or worker</p>

shiv455
<p>As mentioned in <a href="https://kubernetes.io/docs/tutorials/kubernetes-basics/explore/explore-intro/" rel="nofollow noreferrer">the overview</a>:</p>

<blockquote>
  <p>A Pod always runs on a <strong><a href="https://kubernetes.io/docs/concepts/architecture/nodes/" rel="nofollow noreferrer">Node</a></strong>.<br>
  <strong>A Node is a worker machine in Kubernetes</strong> and may be either a virtual or a physical machine, depending on the cluster. Each Node is managed by the Master</p>
</blockquote>

<p>So by definition (even if it runs on the same physical machine than the master), any node is on a "worker machine"</p>

<p><a href="https://i.stack.imgur.com/190yK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/190yK.png" alt="https://d33wubrfki0l68.cloudfront.net/5cb72d407cbe2755e581b6de757e0d81760d5b86/a9df9/docs/tutorials/kubernetes-basics/public/images/module_03_nodes.svg"></a></p>

<p>Only kubectl get node does display a ROLE:</p>

<pre><code>vonc@voncvb:~/.kube$ kubectl get node -o wide
NAME           STATUS    ROLES     AGE       VERSION   EXTERNAL-IP   OS-IMAGE                 KERNEL-VERSION
serv0.server   Ready     &lt;none&gt;    18d       v1.9.7    &lt;none&gt;        SUSE CaaS Platform 3.0  docker://x.y.z.z
serv1.server   Ready     &lt;none&gt;    18d       v1.9.7    &lt;none&gt;        SUSE CaaS Platform 3.0   docker://x.y.z.z
serv2.server   Ready     &lt;none&gt;    18d       v1.9.7    &lt;none&gt;        SUSE CaaS Platform 3.0   docker://x.y.z.z
servm.server   Ready     master    18d       v1.9.7    &lt;none&gt;        SUSE CaaS Platform 3.0   docker://x.y.z.z
                         ^^^^^^^
</code></pre>
