淘汰 GKE 適用的 Identity Service

本文說明 GKE 適用的 Identity Service 淘汰和關閉事宜,包括時間表、里程碑,以及您必須採取的遷移步驟。如果組織是在 2025 年 7 月 1 日當天或之後建立,則無法使用 GKE 適用的 Identity Service。在 1.37 以上版本中,GKE 叢集在任何機構中都不支援這項功能。

這項淘汰作業僅適用於在Google Cloud上執行的 GKE 叢集。連線閘道和 Google Distributed Cloud (僅限軟體) 產品提供的 GKE 身分認證服務 功能並未淘汰。

時間表與里程碑

下表說明 GKE 適用的 Identity Service 淘汰和停用時程:

  1. 2025 年 7 月 1 日:如果機構是在這天或之後建立,則不支援 GKE Identity Service Google Cloud 。

  2. 2026 年 7 月 1 日:GKE 適用的 Identity Service 將在 1.36 版和更早版本中淘汰。在子版本的支援期限結束前,這些版本仍可使用 GKE 適用的 Identity Service。

    1.37 以上版本不支援 GKE 適用的 Identity Service。如果叢集使用 GKE 適用的 Identity Service,就無法升級至 1.37 以上版本。

禁止升級至 1.37 以上版本

如果叢集使用 GKE 適用的 Identity Service,GKE 會禁止自動和手動將叢集升級至 1.37 以上版本。

系統會暫停自動升級作業,直到子版本的標準支援期結束為止。如果叢集已註冊延長版管道,系統會暫停自動升級,直到延長版支援服務結束為止。子版本終止支援後,GKE 會自動將叢集升級至下一個子版本。如果該叢集仍啟用 GKE 適用的 Identity Service,驗證工作流程就會失敗。

如要將叢集升級至 1.37 以上版本,請務必停用 GKE 的 Identity Service。如要透過外部識別資訊提供者 (IdP) 進行驗證,請使用員工身分聯盟。詳情請參閱「從 GKE Identity Service 遷移」。

從 GKE 適用的 Identity Service 遷移

如果您依賴 GKE 適用的 Identity 服務,從第三方 IdP 進行驗證,請遷移至員工身分聯盟。員工身分聯盟支援多種通訊協定,不會在叢集中安裝元件,並與 IAM 整合。

下表說明 Workforce Identity Federation 與 GKE 適用的 Identity Service 之間的主體語法差異:

GKE 適用的 Identity Service 語法 員工身分聯盟語法
amal@example.com principal://iam.googleapis.com/locations/global/workforcePools/full-time-employees/subject/amal@example.com
sre-group principalSet://iam.googleapis.com/locations/global/workforcePools/full-time-employees/group/sre-group

如要遷移叢集以使用 Workforce Identity Federation,請按照下列步驟操作:

  1. 為貴機構和外部 IdP 設定員工身分聯盟。 如需操作說明,請參閱「設定員工身分聯盟」。

  2. 更新叢集中任何 RoleBinding 和 ClusterRoleBinding 的資訊清單,以使用 Workforce Identity Federation 識別碼語法。請使用下列其中一種方式:

    • 程式輔助更新:安裝並執行 gke-identity-service-migrator 工具。如需操作說明,請參閱 GoogleCloudPlatform/gke-utilities 存放區的 README

      這項工具會找出使用 GKE Identity Service 語法的現有 RBAC 繫結,並建立使用對應 Workforce Identity Federation 主體 ID 的新資訊清單。

    • 手動更新:針對參照已驗證使用者或群組的每個繫結,建立物件資訊清單檔案的個別副本,並使用 Workforce Identity Federation 識別碼語法。

  3. 將更新後的 RoleBinding 和 ClusterRoleBinding 資訊清單套用至叢集。

  4. 測試使用者透過員工身分聯盟驗證時,是否能存取相同資源。

  5. 從叢集中移除過時的 RBAC 繫結。

  6. 停用 GKE 適用的 Identity Service:

    gcloud container clusters update CLUSTER_NAME \
        --no-enable-identity-service