How to set a minimum scale for Cloud Run on GKE services?

房东的猫 提交于 2019-12-06 11:42:16

问题


I'm using Cloud Run on Google Kubernetes Engine and I'm able to deploy and access services without a problem.

But since I'm running on GKE and paying for the cluster 24/7 it makes no sense to scale a deployment to zero and always have a cold start for the first request.

I've found that's it's possible to set minScale for the Knative autoscaler to disable scale to zero here, here and here, but I have no idea where to put it.

There are a lot of configurations, services and workloads inside GKE for Isito and Knative-Serving, but I couldn't find anything matching.

Which file or configuration do I have to edit to set minScale to 1? Or won't this be possible since Cloud Run manages the specific template internally?


回答1:


Using kubectl, you should be able to set the annotation autoscaling.knative.dev/minScale: "1" on your Knative service.

See this page for more info



来源:https://stackoverflow.com/questions/55866728/how-to-set-a-minimum-scale-for-cloud-run-on-gke-services

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!