<p>Consider a cluster in which each node has a given taint (let's say <code>NodeType</code>) and a Pod can tolerate a set of <code>NodeType</code>. For example, there are nodes tainted <code>NodeType=A</code>, <code>NodeType=B</code> and <code>NodeType=C</code>.</p>
<p>I'd like to be able to specify for example that some Pods tolerate <code>NodeType=A</code> or <code>NodeType=C</code>, but not <code>NodeType=B</code>. Other Pods (in different Deployments) would tolerate different sets. Is there a way to do this?</p>

alkalinity
<p>Yes, it appears it is possible to do so by adding multiple tolerations with the same key on the pod's spec. An example of the same is given in the official <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/#concepts" rel="nofollow noreferrer">docs</a>.</p>
<p>Here is a demo I tried which works to produce the desired result.</p>
<p>The cluster has three nodes:</p>
<pre><code>kubectl get nodes
NAME      STATUS   AGE     VERSION
dummy-0   Ready    3m17s   v1.17.14
dummy-1   Ready    26m     v1.17.14
dummy-2   Ready    26m     v1.17.14
</code></pre>
<p>I tainted them as mentioned in the question using the <code>kubectl taint</code> command:</p>
<pre><code>kubectl taint node dummy-0 NodeType=A:NoSchedule
kubectl taint node dummy-1 NodeType=B:NoSchedule
kubectl taint node dummy-2 NodeType=C:NoSchedule
</code></pre>
<p>Created a Deployment with three replicas with the matching tolerations:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - image: nginx
        name: nginx-nfs
      tolerations:
      - key: &quot;NodeType&quot;
        operator: &quot;Equal&quot;
        value: &quot;A&quot;
        effect: &quot;NoSchedule&quot;
      - key: &quot;NodeType&quot;
        operator: &quot;Equal&quot;
        value: &quot;B&quot;
        effect: &quot;NoSchedule&quot;
</code></pre>
<p>From the <code>kubectl get pods</code> command, we can see that the pods of the Deployment were scheduled only on the nodes <code>dummy-0</code> and <code>dummy-1</code> and not on <code>dummy-2</code> which has a different taint:</p>
<pre><code>kubectl get pod -o wide
NAME                               READY  STATUS  RESTARTS AGE      IP         NODE
nginx-deployment-5fc8f985d8-2pfvm   1/1   Running    0      8s  100.96.2.11   dummy-0
nginx-deployment-5fc8f985d8-hkrcz   1/1   Running    0      8s  100.96.6.10   dummy-1
nginx-deployment-5fc8f985d8-xfxsx   1/1   Running    0      8s  100.96.6.11   dummy-1
</code></pre>
<p>Further, it is important to understand that the taints and tolerations are useful to make sure that the pods don't get scheduled to a particular node.</p>
<p>We should use the concepts of <a href="https://kubernetes.io/blog/2017/03/advanced-scheduling-in-kubernetes/" rel="nofollow noreferrer">node affinities namely affinity and anti-affinity</a> to make sure that the pods are scheduled to a particular node.</p>
