本頁面說明如何啟用 Google Kubernetes Engine (GKE) Enterprise 版,以及如何存取 Enterprise 功能。GKE Enterprise 是 GKE 的企業級方案,如要進一步瞭解 GKE Enterprise,請參閱 GKE 版本和 GKE Enterprise 技術總覽。
如要瞭解相關費用,請參閱 GKE 定價。
如何啟用 GKE Enterprise?
如要搭配特定叢集使用 GKE Enterprise 功能,請按照下列步驟操作:
- 叢集專案必須啟用 GKE Enterprise。
- 叢集本身必須註冊企業級別。
如果是 Google Cloud上的 GKE 叢集,您可以選擇是否要為每個叢集加購並支付額外級別的功能費用。叢集註冊 GKE Enterprise 級別後,您就能使用所有可用的企業功能。
然後,您可以選擇讓叢集加入機群,以使用全方位的 GKE Enterprise 功能。此外,如果您尚未準備好建立機群,也可以使用叢集搭配部分獨立企業功能。包括進階安全性和法規遵循洞察、二進位授權,以及更豐富的網路功能。
GKE 叢集外部 Google Cloud 預設為企業級叢集和機群成員,且無法變更層級。機群主機專案必須啟用 GKE Enterprise。如要進一步瞭解如何設定這些選項,請參閱說明文件。
如要瞭解 GKE Enterprise 功能的詳細資訊,包括 Google Cloud 不加入機群也能使用的功能,請參閱 GKE Enterprise 部署選項。
事前準備
本頁的操作說明假設您已在所選 Google Cloud 專案中啟用 GKE。如果沒有,請按照下列步驟操作:
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Verify that billing is enabled for your Google Cloud project.
-
Enable the Google Kubernetes Engine API.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Verify that billing is enabled for your Google Cloud project.
-
Enable the Google Kubernetes Engine API.
--tier enterprise
:將叢集註冊至企業版層級- (建議選用)
--enable-fleet
:將叢集新增至專案的機群 - 前往「GKE Clusters」(GKE 叢集) 頁面。這個頁面會顯示所有叢集。
- 在清單中找出要更新的叢集,然後按一下旁邊的「動作」 。
- 在「動作」選單中,選取「變更等級」。
- 在顯示的對話方塊中選取「企業版」,然後按一下「儲存變更」確認操作。
- 機群主專案 (以及跨專案註冊的叢集專案) 已啟用 GKE Enterprise。
- 叢集先前從未註冊至機群。
- 叢集從未明確指定層級,無論是在建立叢集時或之後更新叢集時,都未指定層級。包括:
- 在推出叢集層級前,使用 Google Cloud 控制台建立的叢集。
- 使用 Google Cloud CLI 建立的叢集,但未加上
--tier
標記。 - 使用 Terraform 建立的叢集,但未填入
desired_tier
欄位。
透過指令列啟用 GKE Enterprise
如要透過指令列在專案中啟用 GKE Enterprise,請按照下列步驟在專案中啟用 Anthos API,並指定專案 ID (如果您尚未為 Google Cloud CLI 設定預設專案)。這也會自動啟用 Fleet (GKE Hub) API。
gcloud services enable --project=PROJECT_ID \
anthos.googleapis.com
您也可以使用 Terraform,為專案宣告式地啟用這項 API:
如要進一步瞭解如何使用 Terraform,請參閱「GKE 的 Terraform 支援」。
如要使用 Cloud Service Mesh 等企業功能,您可能需要在專案中啟用其他 API。詳情請參閱相關功能指南。
在 GKE Enterprise 中註冊叢集 Google Cloud
少數例外情況除外, Google Cloud 必須明確將 GKE 叢集註冊至企業級方案,才能使用 GKE Enterprise 功能,註冊方式是在建立叢集時註冊,或是更新現有叢集。
雖然叢集不一定要註冊至專案的機群,但我們建議您這麼做。將叢集加入機群後,即可使用 GKE Enterprise 的全方位功能。如果選擇不註冊叢集,您仍可使用 GKE Enterprise,但功能會受到限制。
註冊新叢集
如要在新叢集使用啟用機群的功能,建議您在建立叢集時,將叢集註冊至機群。在叢集建立期間註冊至機群的 Enterprise 級別叢集,會使用您為多項企業功能選擇的機群層級預設設定建立,並預先啟用建議的記錄和指標。如要進一步瞭解這項功能,請參閱「註冊新叢集」和「設定艦隊層級功能」。
如要在建立叢集時將叢集註冊至 GKE Enterprise,請按照下列步驟操作:
控制台
gcloud
請按照建立 Autopilot、標準區域或 標準可用區叢集的指令列操作說明,指定下列標記:
以下程式碼片段顯示建立 Autopilot 叢集時如何使用這些標記:
gcloud container clusters create-auto CLUSTER NAME \
--tier enterprise \
--enable-fleet
升級現有叢集的層級
如要更新現有叢集以使用 GKE Enterprise,請按照下列步驟操作:
控制台
gcloud
執行下列指令來升級叢集:
gcloud container clusters update CLUSTER NAME --tier enterprise
將 CLUSTER NAME 替換為叢集名稱。
預設行為的例外狀況
在少數情況下,叢集加入機群時,系統會自動升級至 GKE Enterprise。 Google Cloud 如果您打算將叢集註冊至機群,請仔細閱讀本節。
如果符合下列所有條件,標準層級叢集加入機群時,會自動升級至 GKE Enterprise: Google Cloud
如果叢集位於 Google Cloud ,且已使用 GKE Enterprise,則會自動成為 Enterprise 級別叢集。
停用 GKE Enterprise
如要為專案或叢集停用 GKE Enterprise,請按照「停用 GKE Enterprise」一文中的操作說明進行。