排解 Arm 工作負載問題


本頁面說明如何解決部署在 Google Kubernetes Engine (GKE) Autopilot 或 Standard 叢集上的 Arm 工作負載問題。

Arm 節點上的 Pod 發生當機

在 Arm 節點上部署 Pod 時,如果容器映像檔不是為 Arm 架構建構,就會發生下列問題。

如要找出問題,請按照下列步驟操作:

  1. 取得 Pod 的狀態:

    kubectl get pods
    
  2. 取得當機 Pod 的記錄:

    kubectl logs POD_NAME
    

    POD_NAME 替換為當機 Pod 的名稱。

    Pod 記錄中的錯誤訊息類似於下列內容:

    exec ./hello-app: exec format error
    

如要解決這個問題,請確認容器映像檔支援 Arm 架構。按照最佳做法,建立多個架構圖片

Pod 未觸發向上擴充作業

適用於:Autopilot

在不支援的 GKE 版本或不支援的Google Cloud 區域中,嘗試在 Autopilot 叢集上部署 Arm 工作負載時,會發生下列問題。

如要找出問題,請取得叢集事件記錄:

kubectl get events -w

輸出結果會與下列內容相似:

117s        Normal    NotTriggerScaleUp   pod/hello-app2-78fc858558-pg4hz   pod didn't trigger scale-up (it wouldn't fit if a new node is added): 2 node(s) didn't match Pod's node affinity/selector

如要解決這個問題,請確認 Autopilot 叢集執行的是 GKE 1.24.1-gke.1400 以上版本,且Google Cloud 區域支援 Arm 節點。

Pod 停滯在「Pending」狀態

適用於:Autopilot

當您嘗試在 Arm 架構上部署 Autopilot Pod,但 Google Cloud 專案超出配額時,就會發生下列問題。

如要找出問題,請取得叢集的事件記錄:

kubectl get events -w

輸出結果會與下列內容相似:

29m         Warning   FailedScaleUp       pod/hello-app-7b86c88cb8-8vt2k   Node scale up in zones asia-southeast1-b associated with this pod failed: GCE quota exceeded. Pod is at risk of not being scheduled.

部署 Pod 後,記錄檔可能不會立即顯示這項事件。

如要解決這個問題,請要求調整配額

後續步驟