GKE Autopilot 将计算类别更改为“通用”

问题描述 投票:0回答:1

我知道您可以使用以下设置在 gke 中选择不同的计算类。

nodeSelector:
    cloud.google.com/compute-class: Balanced

这部分记录在 https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-compute-classes

我已将其设置为实验,但现在我想撤消它。有没有办法手动将其更改为通用?我已经尝试过诸如

General-purpose
General-Purpose
general-purpose
general
等值,并且全部返回以下错误:

error: deployments.apps "x-api" could not be patched: admission webhook "gkepolicy.common-webhooks.networking.gke.io" denied the request: GKE Warden rejected the request because it violates one or more constraints.
Violations details: {"[denied by autopilot-compute-class-limitation]":["the specified 'cloud.google.com/compute-class:General-purpose' is not supported. Deployment 'x.x-api'."]}
Requested by user: '[email protected]', groups: 'system:authenticated'.
You can run `kubectl replace -f /tmp/kubectl-edit-2874583209.yaml` to try this update again.

我仍然可以通过删除污点来手动更改它,但理想情况下我希望将其作为设置。

kubernetes google-kubernetes-engine
1个回答
0
投票

基于 Google 文档此处“您无法在规范中显式选择通用平台。”,只需删除节点选择器,Pod 将使用通用计算类。

© www.soinside.com 2019 - 2024. All rights reserved.