<p>I installed a "nginx ingress controller" on my GKE cluster.
I followed <a href="https://kubernetes.github.io/ingress-nginx/deploy/" rel="nofollow noreferrer">this guide</a> to install the nginx ingress controller in the GKE.</p>

<p>When deploying resources for the service and ingress resource I realized that the ingress controller was at <code>0/1</code>
<a href="https://i.stack.imgur.com/r3luB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r3luB.png" alt="enter image description here"></a></p>

<p>Events telling me:</p>

<pre><code>0/1 nodes are available: 1 node(s) didn't match node selector.
</code></pre>

<p>Now I checked the yaml/describe: <a href="https://pastebin.com/QG3GKxh1" rel="nofollow noreferrer">https://pastebin.com/QG3GKxh1</a>
And found that:</p>

<pre><code>nodeSelector:
    kubernetes.io/os: linux
</code></pre>

<p>Which looks fine in my opinion. Since I just used the command of the guide to install the controller I have no idea what went wrong from my side.</p>

<h2>Solution:</h2>

<p>The provided answer showed me the way. My node was labeled with <code>beta.kubernetes/io: linux</code> while the controller was looking for <code>kubernetes/io: linux</code>.
Renaming the <code>nodeSelector</code> in the controller worked.</p>

xetra11
<p><code>nodeSelector</code> is used to constraint the nodes on which your Pods can be scheduled.</p>

<p>With:</p>

<pre><code>nodeSelector:
    kubernetes.io/os: linux
</code></pre>

<p>You are saying that Pods must be assigned to a node that has the label
<code>kubernetes.io/os: linux</code>. If none of your nodes has that label, the Pod will never get scheduled.</p>

<p>Removing the selector from the nginx ingress controller or adding the label <code>kubernetes.io/os: linux</code> to any node should fix your issue.</p>
