GKE Autopilot 以错误的方式更改了 pod 的 limits/requests 资源
GKE Autopilot changes the limits/requests resources of a pod in a wrong way
当我使用以下 limits/request 启动 pod 时:
resources:
limits:
cpu: "3500m"
memory: "8192Mi"
ephemeral-storage: "5Gi"
requests:
cpu: "500m"
memory: "512Mi"
ephemeral-storage: "2Gi"
Autopilot 修改资源限制并将其设置为等于请求的限制:
autopilot.gke.io/resource-adjustment: {"input":{"containers":[{"limits":{"cpu":"3500m","ephemeral-storage":"5Gi","memory":"8Gi"},"requests":{"cpu":"500m","ephemeral-storage":"2Gi","memory":"512Mi"},"name":"prueba-init-container"}]},"output":{"containers":[{"limits":{"cpu":"500m","ephemeral-storage":"2Gi","memory":"512Mi"},"requests":{"cpu":"500m","ephemeral-storage":"2Gi","memory":"512Mi"},"name":"prueba-init-container"}]},"modified":true}
seccomp.security.alpha.kubernetes.io/pod: runtime/default
资源限制需要等于 GKE 自动驾驶仪请求的资源
这是 GKE autopilot 的默认行为。 Read More
也许,这个限制是为了让 Google 更容易向你收费,使用 GKE Autopilot,你失去了将资源限制设置为高于请求的 CPU 和内存资源。
您需要确保从一开始就为 pod 提供足够的资源,不多也不少。
这不是错误。如果您尝试设置更高的限制,GKE Autopilot 将覆盖您的限制并使其等于请求的值。
资源限制
In an Autopilot cluster, each Pod is treated as a Guaranteed QoS Class
Pod, with limits that are equal to requests. Autopilot automatically
sets resource limits equal to requests if you do not have resource
limits specified. If you do specify resource limits, your limits will
be overridden and set to be equal to the requests.
当我使用以下 limits/request 启动 pod 时:
resources:
limits:
cpu: "3500m"
memory: "8192Mi"
ephemeral-storage: "5Gi"
requests:
cpu: "500m"
memory: "512Mi"
ephemeral-storage: "2Gi"
Autopilot 修改资源限制并将其设置为等于请求的限制:
autopilot.gke.io/resource-adjustment: {"input":{"containers":[{"limits":{"cpu":"3500m","ephemeral-storage":"5Gi","memory":"8Gi"},"requests":{"cpu":"500m","ephemeral-storage":"2Gi","memory":"512Mi"},"name":"prueba-init-container"}]},"output":{"containers":[{"limits":{"cpu":"500m","ephemeral-storage":"2Gi","memory":"512Mi"},"requests":{"cpu":"500m","ephemeral-storage":"2Gi","memory":"512Mi"},"name":"prueba-init-container"}]},"modified":true} seccomp.security.alpha.kubernetes.io/pod: runtime/default
资源限制需要等于 GKE 自动驾驶仪请求的资源
这是 GKE autopilot 的默认行为。 Read More
也许,这个限制是为了让 Google 更容易向你收费,使用 GKE Autopilot,你失去了将资源限制设置为高于请求的 CPU 和内存资源。
您需要确保从一开始就为 pod 提供足够的资源,不多也不少。
这不是错误。如果您尝试设置更高的限制,GKE Autopilot 将覆盖您的限制并使其等于请求的值。
资源限制
In an Autopilot cluster, each Pod is treated as a Guaranteed QoS Class Pod, with limits that are equal to requests. Autopilot automatically sets resource limits equal to requests if you do not have resource limits specified. If you do specify resource limits, your limits will be overridden and set to be equal to the requests.