<p>Is it possible to create a node-pool that the scheduler will ignore by default but that can be targeted by node-selector?</p>

<p>If your node-pool has a static size or at least it's not auto-scaling then this is easy to accomplish.</p>

<p>First, <a href="https://kubernetes.io/docs/user-guide/kubectl/kubectl_taint/" rel="nofollow noreferrer">taint</a> the nodes in that pool:</p>

<pre><code>kubectl taint node \
  `kubectl get node -l cloud.google.com/gke-nodepool=my-pool -o name` \
  dedicated=my-pool:NoSchedule
</code></pre>

<h2>Kubernetes version >= 1.6</h2>

<p>Then add <code>affinity</code> and <code>tolerations</code> values under <code>spec:</code> in your Pod(templates) that need to be able to run on these nodes:</p>

<pre><code>spec:
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: dedicated
            operator: In
            values: ["my-pool"]
  tolerations: 
  - key: "key"
    operator: "Equal"
    value: "value"
    effect: "NoSchedule"
</code></pre>

<h2>Pre 1.6</h2>

<p>Then add these annotations to your Pod(templates) that need to be able to run on these nodes:</p>

<pre><code>annotations:
  scheduler.alpha.kubernetes.io/tolerations: &gt;
    [{"key":"dedicated", "value":"my-pool"}]
  scheduler.alpha.kubernetes.io/affinity: &gt;
    {
      "nodeAffinity": {
        "requiredDuringSchedulingIgnoredDuringExecution": {
          "nodeSelectorTerms": [
            {
              "matchExpressions": [
                {
                  "key": "dedicated",
                  "operator": "In",
                  "values": ["my-pool"]
                }
              ]
            }
          ]
        }
      }
    }
</code></pre>

<p>See the <a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/taint-toleration-dedicated.md" rel="nofollow noreferrer">design doc</a> for more information.</p>

<h2>Autoscaling group of nodes</h2>

<p>You need to add the <code>--register-with-taints</code> parameter to <a href="http://kubernetes.io/docs/admin/kubelet" rel="nofollow noreferrer"><code>kubelet</code></a>:</p>

<blockquote>
  <p>Register the node with the given list of taints (comma separated <code>&lt;key&gt;=&lt;value&gt;:&lt;effect&gt;</code>). No-op if register-node is false.</p>
</blockquote>

<p>In another <a href="https://stackoverflow.com/questions/43032406/gke-cant-disable-transparent-huge-pages-permission-denied/43081893#43081893">answer</a> I gave some examples on how to persist that setting. GKE now also has specific support for <a href="https://cloud.google.com/container-engine/docs/node-taints" rel="nofollow noreferrer">tainting node pools</a></p>
