<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>

No1Lives4Ever
<p>You can have two .yaml files for two deployments and you can select the node pool as follows.</p>

<pre><code>nodeSelector:
    nodeclass: pool1
</code></pre>

<p>Add the above code to your yaml file.</p>
