存取需求
本頁面說明使用 GKE on Azure 的 Azure 和 Google Cloud 需求。
Azure
本節說明安裝及使用 GKE on Azure 時所需的 Azure 權限和網路存取權。
安裝角色和權限
如要為 Azure 上的 GKE 設定 Azure 帳戶,您需要下列 Azure 內建角色:
應用程式角色和權限
如要允許 GKE on Azure 管理 Azure 帳戶中的資源,您必須授予應用程式註冊權限。下一節將說明這些權限。
如需授予這些權限的範例,請參閱必要條件。
建立自訂角色
GKE on Azure 需要下列權限,才能建立自訂角色,授予叢集控制層存取相同 VNet 中資源的權限。
範圍:您的 VNet 資源群組
權限:
"Microsoft.Authorization/roleDefinitions/read",
"Microsoft.Authorization/roleDefinitions/write",
"Microsoft.Authorization/roleDefinitions/delete",
加入 VNet
GKE on Azure 需要下列權限,才能將資源加入虛擬網路 (VNet)。此外,這項指令也會設定角色指派,允許控制平面虛擬機器 (VM) 執行個體使用虛擬網路。
範圍:VNet 資源
權限:
"*/read",
"Microsoft.Network/*/join/action",
"Microsoft.Authorization/roleAssignments/read",
"Microsoft.Authorization/roleAssignments/write",
"Microsoft.Authorization/roleAssignments/delete",
VM 身分角色
GKE on Azure 需要下列 Azure 內建角色,才能在資源群組中建立資源及管理 VM 身分角色指派作業。Azure 上的 GKE 也會使用 Azure Key Vault 分散密鑰。
範圍:叢集資源群組
角色:
網路數據傳出量
根據預設,Azure 叢集上的 GKE 會專屬於您的 Azure 虛擬網路 (VNet)。這表示系統不允許來自網際網路的連入流量,且 VM 沒有公開 IP 位址。
建立及管理叢集時,需要有限的網際網路連出存取權。 傳出網際網路連線應由 NAT 閘道提供。
外連
本節定義 GKE on Azure 建立及管理叢集時需要連線的位址。
一般連結
控制平面和節點集區 VM 必須能夠解析 DNS,並在通訊埠 443 上建立連出的 TCP 連線。
外連主機名稱
Azure 上的 GKE 可能會連線至下列端點:
端點 | 原因 |
---|---|
storage.googleapis.com |
在安裝期間從 Cloud Storage 擷取二進位檔依附元件。 |
*.gcr.io |
在安裝期間從 Container Registry 擷取二進位依附元件。 |
gkeconnect.googleapis.com |
適用於 Google Kubernetes Engine (GKE) Enterprise 版多叢集管理。 |
oauth2.googleapis.com sts.googleapis.com |
用於叢集驗證。 |
logging.googleapis.com |
將記錄檔傳送至 Cloud Logging。 |
monitoring.googleapis.com |
用於將指標傳送至 Cloud Monitoring。 |
opsconfigmonitoring.googleapis.com |
將資源中繼資料傳送至 Cloud Monitoring。 |
servicecontrol.googleapis.com |
適用於 Cloud 稽核記錄。 |
Google Cloud
本節說明安裝 GKE on Azure 時所需的 Google Cloud Identity and Access Management (IAM) 角色和權限。
身分與存取權管理角色
安裝 GKE on Azure
如要安裝 GKE on Azure 搶先版,啟用 GKE on Azure API 的使用者必須在許可清單中。
管理叢集
如要管理 GKE 叢集,可以使用預先定義的 IAM 角色。詳情請參閱「API 權限」。
Google Cloud API
Azure 上的 GKE 會在專案中使用下列 API: Google Cloud
gkemulticloud.googleapis.com
anthos.googleapis.com
gkeconnect.googleapis.com
cloudresourcemanager.googleapis.com
containerregistry.googleapis.com
gkehub.googleapis.com
logging.googleapis.com
monitoring.googleapis.com
opsconfigmonitoring.googleapis.com
servicecontrol.googleapis.com
serviceusage.googleapis.com
stackdriver.googleapis.com
storage-api.googleapis.com
storage-component.googleapis.com
securetoken.googleapis.com
iam.googleapis.com
iamcredentials.googleapis.com
sts.googleapis.com
設定工作站
如要安裝及升級 GKE on Azure,您必須存取執行 Linux 或 macOS 的工作站。本說明文件假設您在 Linux 或 macOS 上使用 bash 殼層。如果無法存取 Bash Shell 環境,可以使用 Cloud Shell。
Azure
如要在 Azure 上安裝 GKE,您必須先安裝 Azure CLI。詳情請參閱「安裝 Azure CLI」。
Google Cloud CLI
您可以使用 Google Cloud CLI 347.0.0 以上版本,安裝及管理 Azure 上的 GKE。如要確認是否已安裝 gcloud CLI,請執行下列指令:
gcloud version
如果尚未安裝 gcloud CLI,請參閱「安裝 Google Cloud CLI」。
後續步驟
- 完成安裝的先決條件。