访问权限要求
本页面介绍了使用 GKE on Azure 的 Azure 和 Google Cloud 要求。
Azure
本部分介绍安装和使用 GKE on Azure 所需的 Azure 权限和网络访问权限。
安装角色和权限
如需为 GKE on Azure 设置 Azure 账号,您需要以下 Azure 内置角色:
Application Administrator,用于创建 Azure Active Directory 应用和上传证书。
User Access Administrator,用于授予对资源组和资源的访问权限。
Contributor,用于创建资源。
应用角色和权限
为了允许 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",
虚拟机身份角色
GKE on Azure 需要以下 Azure 内置角色才能在资源组中创建资源和管理虚拟机身份角色分配。GKE on Azure 还使用 Azure Key Vault 分发 Secret。
范围:您的集群资源组
角色:
出站网络访问权限
默认情况下,GKE on Azure 集群是您的 Azure Virtual Network (VNet) 的专用集群。这意味着不允许来自互联网的入站流量,并且虚拟机没有公共 IP 地址。
创建和管理集群需要有限的出站互联网访问权限。出站互联网连接应由 NAT 网关提供。
出站连接
本部分定义 GKE on Azure 需要连接以创建和管理集群的地址。
常规连接
控制平面和节点池虚拟机必须能够解析 DNS,并在端口 443 上建立出站 TCP 连接。
出站主机名
GKE on Azure 可能会连接到以下端点:
端点 | 原因 |
---|---|
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 Audit Logging。 |
Google Cloud
本部分介绍安装 GKE on Azure 所需的 Google Cloud Identity and Access Management (IAM) 角色和权限。
Identity and Access Management 角色
安装 GKE on Azure
如需安装 GKE on Azure 预览版,激活 GKE on Azure API 的用户需要列入许可名单。
管理集群
如需管理 GKE 集群,您可以使用预定义的 IAM 角色。如需了解详情,请参阅 API 权限。
Google Cloud API
GKE on Azure 在您的 Google Cloud 项目中使用以下 API:
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 shell。如果您无权访问 bash shell 环境,则可以使用 Cloud Shell。
Azure
如需安装 GKE on Azure,您需要安装 Azure CLI。如需了解详情,请参阅安装 Azure CLI。
Google Cloud CLI
您可以使用 Google Cloud CLI 347.0.0 版或更高版本安装和管理 GKE on Azure。如需确认已安装 gcloud CLI,请运行以下命令:
gcloud version
如果您未安装 gcloud CLI,请参阅安装 Google Cloud CLI。
后续步骤
- 完成安装的前提条件。