在门户中的 Azure Stack Hub 上使用 Azure Kubernetes 服务

可以使用 Azure Kubernetes 服务 (AKS) 中的 Azure Stack Hub 用户门户来发现、创建、缩放、升级和删除 AKS 群集。

验证资源提供程序

你需要为订阅提供 Microsoft.ContainerService 资源提供程序。 要查找订阅中可用的服务,请执行以下操作:

  1. 登录到 Azure Stack 用户门户。 在“常规”组中选择“所有服务”>“资源浏览器” 。

    Check for the Microsoft.ContainerService resource provider.

  2. 在资源浏览器中,找到 Microsoft.ContainerService

    Check for the Microsoft.ContainerService in the Resource explorer.

  3. 如果订阅没有 Microsoft.ContainerService,则需要让云操作员将资源提供程序添加到订阅,或者需要向提供商订阅订阅。 请与云操作员联系。

发现可用的 AKS 群集

  1. 在 Azure Stack 租户门户中,找到“所有服务”,然后选择“Kubernetes 服务” 。

    This is the Azure Stack tenant portal.

  2. 验证已创建的所有群集是否显示在“Kubernetes 服务”中:

    Verify the clusters that you have created in the portal.

  3. 验证是否可以查看任何群集的详细信息:

    The portal contains the details of the AKS clusters.

创建群集

  1. 在 Kubernetes 服务中,选择“添加”。

    You can select select add in the portal to add a cluster.

  2. 按照步骤创建 AKS 群集。 第一步是收集基本群集属性:

    Create an AKS cluster.

    使用 Kubernetes 1.20 或更高版本。 有关详细信息,请参阅部署到 AKS 群集的应用程序无法访问永久性卷

  3. 在“节点”池中,可以看到 Azure Stack Hub 中只允许一个节点池:

    Open the Node pools blade.

  4. 在“身份验证”中,提供服务主体 (SPN)。 SPN 不会像在 Azure 中一样自动生成。 选择“配置服务主体”链接并添加服务主体。 可以找到创建群集的说明

    Add the service principle.

  5. 在“网络”中,选择 Azure CNI,然后继续创建群集 。

    Add Azure CNI for networking

缩放群集

  1. 在群集详细信息中,选择“节点池”,然后选择节点池并选择“缩放”

    Select scale cluster.

  2. 在右侧缩放面板中,选择新节点计数

    Select new node count.

删除群集

  1. 在 AKS 群集的概述中,找到并选择“删除”,如下图所示。

    You can review the details of your cluster in the portal.

  2. 验证群集是否已删除。 此外,检查关联的资源组是否已删除。 在“资源组”中,查找具有以下模式 <…>_clustername_location 的资源组。 如果找不到资源,则已正确将其删除。

后续步骤

了解 AKS on Azure Stack Hub