<p>I have a cluster with 3 masters and 3 nodes, the masters are untained and pods can be scheduled in them.</p>

<p>But I want the pod runs in nodes preferentially if their resources are enough only.
Because the masters are very significant but resource in cluster is limited, so that they are untained.</p>

<p>In general, my goal is to let the pods run as much as possible on the node instead of the master.</p>

<p>Is there a <code>AlgorithmProvider</code> achieve it?</p>

Aixes Hunter
<p>Yes, you can use node affinity to make it.</p>

<p>Here is an example:</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: with-node-affinity
spec:
  affinity:
    nodeAffinity:
      preferredDuringSchedulingIgnoredDuringExecution:
      - weight: 1
        preference:
          matchExpressions:
          - key: node-type
            operator: In
            values:
            - worker
  containers:
  - name: with-node-affinity
    image: k8s.gcr.io/pause:2.0
</code></pre>

<p>Also, you need to label your node with `node-type=worker</p>
