Cloud Run on GKE autoscaling

10/25/2019

The Cloud Run on GKE documentation says

Note that although these instructions don't enable cluster autoscaling to resize clusters for demand, Cloud Run for Anthos on Google Cloud automatically scales instances within the cluster.

Does that mean that if I create a Cloud Run cluster using the default configuration, my service will never scale past the capacity of the three nodes of the cluster?

Is it possible to enable Kubernetes autoscaling for Cloud Run clusters, or will that conflict with the internal Cloud Run autoscaler? I'd like to be able to scale up my Cloud Run cluster to many nodes, but take advantage of the autoscaler to avoid wasting resources.

-- Andreas Jansson
google-cloud-platform
google-cloud-run
google-kubernetes-engine

1 Answer

10/26/2019

You can define an autoscaling NodePool.

The warning is just about the Cloud Run (or Knative) autoscaller manage only the Pod autoscalling and doesn't manage the nodes autoscalling.

The nodes autoscaller is managed by K8S and based on CPU usage.

Remember, you can't scale to 0 node, but you can scale to 0 Pod. In addition, the node scaling and very slow compared to node scaling.

-- guillaume blaquiere
Source: StackOverflow