kubernetes - 自动缩放 Google Cloud Kubernetes
问题描述
我们有一个在 Google Cloud Kubernetes 集群下运行的应用程序,在我的测试场景中运行良好。我们为这些 Pod 设置了自动缩放——我们可能永远不需要降到 0,但希望它(目前)扩展到 20 个 Pod,然后再缩减,很明显。我们正在使用 faas-cli 进行部署。首先,尝试:
faas-cli deploy --replace --update=false -f ./process-listing-image.yml \
--gateway=https://openfaas.ihouseprd.com \
--label "com.openfaas.scale.min=1" \
--label "com.openfaas.scale.max=20" \
--label "com.openfaas.scale.factor=5"
但这给了我们 1 个吊舱,并且从未移动过。建议使用:
faas-cli deploy --replace --update=false -f ./process-listing-image.yml \
--gateway=https://openfaas.ihouseprd.com \
--label "com.openfaas.scale.min=0" \
--label "com.openfaas.scale.max=20" \
--label "com.openfaas.scale.factor=5"
但这仍然给了我们一个吊舱。我最近尝试过:
faas-cli deploy --replace --update=false -f ./process-listing-image.yml \
--gateway=https://openfaas.ihouseprd.com \
--label "com.openfaas.scale.min=5" \
--label "com.openfaas.scale.max=20" \
--label "com.openfaas.scale.factor=5"
它产生了 5 个 pod,但尽管有数千个请求在等待,但它的规模并没有超出这个范围。查看 Cloud Console 的“部署详细信息”屏幕,我看到了五个 pod,但无法判断所有 5 个是否都在工作。
知道为什么这些东西没有缩放吗?
解决方案
推荐阅读
- gradle - 在使用 Gradle 5.4 的 multibuild 项目中,java 8 的 sourceSompatiblity 没有生效
- symfony - 如何在数据库中添加 JSON 字段?
- java - 应用程序无法加载 application.yml 文件
- regex - 使用 NIFI 中的替换文本从数据中提取文本时出错
- hibernate - SpringBoot 2.1.5.RELEASE & MySQL 8.0.15 中未生成 GenerationType.IDENTITY
- javascript - 在 React Router 中,我如何删除/更改我之前发送的 history.push 中的参数?
- javascript - 如何首先向上滚动 url 地址栏(在移动浏览器上)
- c# - LINQ 查询错误:无法创建类型的常量值。此上下文仅支持原始类型或枚举类型
- deep-learning - 深度学习的随机梯度
- cocoa-touch - 使用 colorWithPatternImage 为 UIView 着色