檢視群集升級狀態

虛擬私有雲 經典基礎架構

對於執行 4.16 或更新版本的群集,您可以使用 oc adm upgrade status 指令在主版本更新時檢查群集主控程式的更新狀態。 此指令提供有關更新狀態的詳細資訊,以便您判斷更新是否正常進行或是否需要介入。 如果需要干預,指令會提供問題的詳細資訊以及相關文件的連結,以協助解決問題。 如需詳細資訊,請參閱 Red Hat OpenShift 文件

oc adm upgrade status 指令是 Red Hat OpenShift 的技術預覽。

取得群集更新詳細資訊

  1. 執行以下指令,將 OC_ENABLE_CMD_UPGRADE_STATUS 環境變數設定為 true。

    export OC_ENABLE_CMD_UPGRADE_STATUS=true
    
  2. 執行 upgrade status 指令。

    oc adm upgrade status
    
  3. 檢視輸出。 如果輸出顯示更新有任何問題,請閱讀詳細資訊,並依照所提供的連結至相關文件,以協助解決問題。

    主更新進行中的輸出範例。

    An update is in progress for 1m39s: Working towards 4.16.7: 473 of 673 done (70% complete), waiting on console, csi-snapshot-controller, image-registry, ingress, insights, kube-storage-version-migrator, marketplace, monitoring, node-tuning, openshift-samples, operator-lifecycle-manager, service-ca, storage
    
    = Control Plane =
    Assessment:      Progressing
    Completion:      0%
    Duration:        1m38.761469s
    Operator Status: 17 Total, 17 Available, 0 Progressing, 0 Degraded
    

    如果沒有更新進行中,輸出範例。

    The cluster version is not updating (Progressing=False).
    
    Reason: <none>
    Message: Cluster version is 4.16.7