使用 Google Cloud Registry 时避免错误 429(超出配额)

Avoiding Error 429 (quota exceeded) while working with Google Cloud Registry

我在 Google Container Registry 中遇到 429 错误,同时拉取了太多图像

Error: Status 429 trying to pull repository [...] "Quota Exceeded."

有一个包含多个节点的 Kubernetes 集群,pods 实施 Kubeflow 步骤。在 Google guide 他们建议如下:

To avoid hitting the fixed quota limit, you can:
- Increase the number of IP addresses talking to Container Registry. 
  Quotas are per IP address.
- Add retries that introduce a delay. 
  For example, you could use exponential backoff.

问题:

更新:

在 Cloud Registry 配额限制方面似乎无能为力,因为它们是 固定的。根据Container Registry > Doc > Resources > Quotas and limits:

Any request sent to Container Registry has a 2 hour timeout limit.

The fixed rate limits per client IP address are:

  • 50,000 HTTP requests every 10 minutes
  • 1,000,000 HTTP requests per day

Google 提供对 GKE 的支持,但 Google 不支持 Kubeflow 本身。这个问题应该提交给 Kubeflow 支持。

可以在 GitHub 的项目页面上注册有关违反配额限制的 Kubeflow 问题以及有关如何让容器拉动使用更多 IP 地址的问题: https://github.com/kubeflow/kubeflow/issues

此处提供其他支持选项: https://www.kubeflow.org/docs/other-guides/support/

如果您使用 CLI,您可以尝试在部署之前自定义 Kubeflow 配置文件或将其拆分为单独的部署以克服 Cloud Registry 配额限制。这种方法有助于一些复杂的部署。这里的一件重要事情是处理依赖关系。首先运行

kfctl build -v -f ${CONFIG_URI}

在文件 ${KF_DIR}/kfctl_gcp_iap.yaml 中进行更改,然后 运行

kfctl apply -v -f ${CONFIG_URI}