<p>I am looking to implement "PodNodeSelector" in GKE. I want to divide my worker node into groups of performance, stage and production Namespace.
I am not using nodeselector (node affinity) or taints/toleration, as I want to use same deployment template files for each environment. </p>

<pre><code>worker1/2  -&gt; Namespace perf
worker 3/4 -&gt; Namespace stage
worker 5/6 -&gt; Namespace prod 
</code></pre>

<p>I can implement this in normal k8s cluster using "PodNodeSelector" but I am not able to figure it out in gke. </p>

pythonhmmm
<p>As @Wojtek_B already mentioned in his answer - PodNodeSelector is not available on GKE. However, I have just open sourced a mutating webhook that does allow you to achieve the same results by allowing you to add node affinity on a namespace level (it's even a bit more flexible, imo:). It is called <a href="https://github.com/idgenchev/namespace-node-affinity" rel="nofollow noreferrer">namespace-node-affinity</a> and is available on <a href="https://github.com/idgenchev/namespace-node-affinity" rel="nofollow noreferrer">GitHub</a>.</p>
<p>PS: PodNodeSelector is not available on EKS either, so the mutating webhook is a solution there too :)</p>
