<p>Is it possible to create a Cloud Run on GKE (Anthos) Kubernetes Cluster with Preemptible nodes and if so can you also enable plugins such as gke-node-pool-shifter and  gke-pvm-killer or will it interfere with cloud run actions such as autoscaling pods</p>

<p><a href="https://hub.helm.sh/charts/rimusz/gke-node-pool-shifter" rel="nofollow noreferrer">https://hub.helm.sh/charts/rimusz/gke-node-pool-shifter</a></p>

<p><a href="https://hub.helm.sh/charts/rimusz/gke-pvm-killer" rel="nofollow noreferrer">https://hub.helm.sh/charts/rimusz/gke-pvm-killer</a></p>

john_taylor
<p>Technically a Cloud Run on GKE cluster is still a GKE cluster at the end of the day, so it can have preemptive node pools.</p>

<p>However, some Knative Serving components, such as the <code>activator</code> and <code>autoscaler</code> are in the hot path of serving the requests. You need to make sure they don't end up in a preemptible pool. Similarly, the <code>controller</code> and <code>webhook</code> are somewhat central to the control plane lifecycle of Knative API objects, so you also need to make sure these pods end up in a non-preemptible node pool.</p>

<p>Secondly, Knative (for now) does not support node selectors or taints/tolerations: <a href="https://knative.tips/pod-config/node-affinity/" rel="nofollow noreferrer">https://knative.tips/pod-config/node-affinity/</a> It simply doesn't give you a way to specify <code>nodeSelector</code> or other affinity fields in the Pod template of Knative Service object.</p>

<p>Therefore, you gotta find out a way (like implementing your mutating admission webhook for Knative-created pods) to add such node selectors to the Pods, which is quite tedious.</p>

<p>However, by combining node taints and pd tolerations, I think you can have Knative system components end up in a non-preemptible pool, and everything else (i.e. Knative-created pods) in other nodes (i.e. preemptible nodes).</p>
