<p>I am in situation where number of nodes is reasonably large. Nodes are consumable and can be added and removed (if idle) at any time.  All nodes would have labels</p>
<blockquote>
<p>label.category=A or
label.category=B</p>
</blockquote>
<p>I want to schedule my pods onto nodes with the same category. I really do not wish to hardcode which one. All I want is that a group of pods would end up in the same category nodes.</p>

bioffe
<p>you may wanted to use Pod Topology Spread Constraints, as example below</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: mypod
spec:
 topologySpreadConstraints:
    - maxSkew: &lt;integer&gt;
      topologyKey: &lt;string&gt;
      whenUnsatisfiable: &lt;string&gt;
      labelSelector: &lt;object&gt;
</code></pre>
