<p>How can I configure a specific pod to run on a multi-node kubernetes cluster so that it would restrict the containers of the POD to a subset of the nodes. </p>

<p>E.g. let's say I have A, B, C three nodes running mu kubernetes cluster. </p>

<p>How to limit a Pod to run its containers only on A &amp; B, and not on C? </p>

<p>You can add label to nodes that you want to run pod on and add nodeSelector to pod configuration. The process is described here:</p>

<p><a href="http://kubernetes.io/docs/user-guide/node-selection/" rel="noreferrer">http://kubernetes.io/docs/user-guide/node-selection/</a></p>

<p>So basically you want to</p>

<pre><code>kubectl label nodes A node_type=foo
kubectl label nodes B node_type=foo
</code></pre>

<p>And you want to have this nodeSelector in your pod spec:</p>

<pre><code>nodeSelector:
    node_type: foo
</code></pre>
