Implement PodNodeSelector in GKE

12/15/2019

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.

worker1/2  -> Namespace perf
worker 3/4 -> Namespace stage
worker 5/6 -> Namespace prod 

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

-- pythonhmmm
google-kubernetes-engine
kubernetes
kubernetes-helm

1 Answer

12/16/2019

This feature is not included in GKE since it's a managed version of Kubernetes and the admission controllers for that feature aren't enabled.

What you can do is to create a Feature Request using issue tracker and let the product team know that you'd like to have that feature available.

As the most feasible alternitive, you can use taint or affinity (which you don't want) or create your own cluster in GCE.

-- W_B
Source: StackOverflow