<p>I have Kubernetes cluster, hosted on Google cloud platform, that running two deployments: <code>app1</code> and <code>app2</code>.</p>

<p>My cluster have two Node-Pools: <code>pool1</code> and <code>pool2</code>. </p>

<p>Deploying pods, from yaml file, like this: </p>

<pre><code>kubectl apply -f ./app1.yaml
kubectl apply -f ./app2.yaml
</code></pre>

<p>Actualy, it deploy two pods to <code>pool1</code>, which is the cluster "default-pool".</p>

<p>I want to change this behavior to deploy <code>app2</code> to <code>pool2</code> (and <code>app1</code> to <code>pool1</code> - as before, default). Looking to pseudo command like this:</p>

<pre><code>kubectl apply -f ./app1.yaml
kubectl apply -f ./app2.yaml --pool=pool2
</code></pre>

<p>explicit give the pool name when publishing new pod.</p>

<p>How to do it right? </p>

<p>Thanks!</p>

<p>You need to have labels differentiating the nodes in each pool. Then look at pod affinity to bind pods to nodes with certain labels. If you have to have this off the command line I believe it would be possible via overrides it won't look nearly as pretty as your desired line</p>
