當我啟動具有以下限制/請求的 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"}]},"修改":true} seccomp.security.alpha.kubernetes.io/pod: 運行時/默認
uj5u.com熱心網友回復:
資源限制需要等于 GKE Autopilot 請求的資源
這是 GKE自動駕駛儀的默認行為。閱讀更多
或許,這個限制是為了讓 Google 更容易向你收取更好的費用,使用GKE Autopilot,你失去了將資源限制設定為高于請求的 CPU 和記憶體資源的能力。
您需要確保從一開始就為 Pod 提供足夠的資源,不多也不少。
這不是錯誤。如果您嘗試設定更高的限制,GKE Autopilot 只會覆寫您的限制并使其等于請求的值。
資源限制
在 Autopilot 集群中,每個 Pod 都被視為一個有保證的 QoS 類 Pod,其限制等于請求。如果您沒有指定資源限制,Autopilot 會自動將資源限制設定為等于請求。如果您確實指定了資源限制,您的限制將被覆寫并設定為等于請求。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/377091.html
標籤:Kubernetes google-kubernetes-engine
上一篇:Ingress遷移流程
