<p>Say I have a 5 node cluster of kafka and a kubernetes cluster of 100 nodes.</p>
<p>Now, I want to find all 5 nodes (of 100) which is hosting kafka pod. So something like:</p>
<pre><code>kubectl get nodes --selector=&quot;deployment.kafka&quot;
</code></pre>

codersofthedark
<p>I dont think thats possible, what you can do is select your pods based on labels and get the node name, As @Krishna said in his comment, so the command will be</p>
<pre><code>kubectl get pods -n NAMESPACE_NAME -l app=kafka  -o wide | awk '{print $7}'
</code></pre>
<p><code>app=kafka</code> is the label on the pods, it might be different in your case</p>
