Is it possible to get a list of pods that are Running on matser from kubectl?
i have tried this
kubectl get pods -o wide --sort-by="{.spec.nodeName}"
but this doesnt say whether the node is master or worker
As mentioned in the overview:
A Pod always runs on a Node.
A Node is a worker machine in Kubernetes and may be either a virtual or a physical machine, depending on the cluster. Each Node is managed by the Master
So by definition (even if it runs on the same physical machine than the master), any node is on a "worker machine"
Only kubectl get node does display a ROLE:
vonc@voncvb:~/.kube$ kubectl get node -o wide
NAME STATUS ROLES AGE VERSION EXTERNAL-IP OS-IMAGE KERNEL-VERSION
serv0.server Ready <none> 18d v1.9.7 <none> SUSE CaaS Platform 3.0 docker://x.y.z.z
serv1.server Ready <none> 18d v1.9.7 <none> SUSE CaaS Platform 3.0 docker://x.y.z.z
serv2.server Ready <none> 18d v1.9.7 <none> SUSE CaaS Platform 3.0 docker://x.y.z.z
servm.server Ready master 18d v1.9.7 <none> SUSE CaaS Platform 3.0 docker://x.y.z.z
^^^^^^^