title: "Predicate NodeAffinity failed"
body: <p>I have a GKE cluster which I updated to &quot;v1.19.11-gke.2101&quot;.</p>
  <p>In that cluster we are running tons of pods which have node selectors like this:</p>
  <pre><code>      nodeSelector:
          cloud.google.com/gke-nodepool: default-pool
  </code></pre>
  <p>Since I updated the cluster, from time to time the pods are entering in:</p>
  <pre><code>Status:         Failed
  Reason:         NodeAffinity&quot;
  </code></pre>
  <p>With these status events:</p>
  <pre><code>  Warning  NodeNotReady  55m   node-controller                                            Node is not ready
    Warning  NodeAffinity  53m   kubelet, gke-ef-gke-cluster-front-default-pool-bbda0bbf-t4js  Predicate NodeAffinity failed
  </code></pre>
  <p>The thing is that even though the status is &quot;fail&quot;, other pods are successfully scheduled so there is no &quot;real issue&quot; just an annoying red flag which I would like to get rid of.</p>
  <p>I saw that there are several issues closed in the kubernets GitHub repo mentioning this and claiming that is fixed:</p>
  <ul>
  <li><a href="https://github.com/kubernetes/kubernetes/issues/100467" rel="noreferrer">https://github.com/kubernetes/kubernetes/issues/100467</a></li>
  <li><a href="https://github.com/kubernetes/kubernetes/pull/99336" rel="noreferrer">https://github.com/kubernetes/kubernetes/pull/99336</a></li>
  </ul>
  <p>But the problem is still there in GKE 1.19.11. AFAIK gke has its own Kubernetes implementation so.. does any body know if it is actually solved in a specific GKE version? which one? And even if not.. Any idea of how to get rid of annoying flag without having to manually/periodically delete the stuck pods?</p>
  <p>Thanks in advance, any help will be more than welcome.</p>