快速入门:使用 Windows Admin Center 设置 Azure Stack HCI 上的 Azure Kubernetes 服务Quickstart: Set up Azure Kubernetes Service on Azure Stack HCI using Windows Admin Center

适用于:Azure Stack HCIApplies to: Azure Stack HCI

在本快速指南中,使用 Windows Admin Center 设置 Azure Stack HCI 上的 Azure Kubernetes 服务。In this quickstart, you set up Azure Kubernetes Service on Azure Stack HCI using Windows Admin Center. 若要改为使用 PowerShell,请参阅使用 PowerShell 进行设置To instead use PowerShell, see Set up with PowerShell.

设置涉及以下任务:Setting up involves the following tasks:

  • 下载 Azure Stack HCI 上的 Azure Kubernetes 服务Download Azure Kubernetes Service on Azure Stack HCI
  • 设置 Windows Admin Center(如果尚未这样做)Set up Windows Admin Center, if you haven't done so already
  • 为 Windows Admin Center 安装 Azure Stack HCI 的 Azure Kubernetes 服务扩展Install the Azure Kubernetes Service for Azure Stack HCI extension for Windows Admin Center
  • 在要将 Kubernetes 群集部署到的系统上设置 Azure Kubernetes 服务主机Set up an Azure Kubernetes Service host on the system you want to deploy the Kubernetes cluster to

在开始之前,请确保已满足系统要求页上的所有先决条件。Before getting started, make sure you have satisfied all the prerequisites on the system requirements page.

下载 Azure Stack HCI 上的 Azure Kubernetes 服务Download Azure Kubernetes Service on Azure Stack HCI

如果尚未下载预览版软件,请参阅评估 Azure Stack HCI 上的 AKSIf you haven't already downloaded the preview software, see evaluate AKS on Azure Stack HCI. 系统会要求你下载 Azure Stack HCI 上的 AKS 以及 Windows Admin Center。You will be asked to download AKS on Azure Stack HCI as well as Windows Admin Center.

设置 Windows Admin CenterSetting up Windows Admin Center

如果尚未安装 Windows Admin Center,请参阅安装 Windows Admin CenterIf you haven't already installed Windows Admin Center, see install Windows Admin Center. 对于 Azure Stack HCI 上的 Azure Kubernetes 服务的公共预览版,必须在 Windows 10 计算机上下载并运行 Windows Admin Center。For public preview of Azure Kubernetes Service on Azure Stack HCI, you must download and run Windows Admin Center on a Windows 10 machine. 目前只有 Windows Admin Center 桌面模式与 Azure Stack HCI 上的 Azure Kubernetes 服务兼容。Only Windows Admin Center desktop mode is compatible with Azure Kubernetes Service on Azure Stack HCI right now. Azure Stack HCI 上的 Azure Kubernetes 服务功能仅适用于 Windows Admin Center 版本2009 或更高版本。Azure Kubernetes Service on Azure Stack HCI functionality is only available on Windows Admin Center builds 2009 or later.

安装 Azure Kubernetes 服务扩展Installing the Azure Kubernetes Service extension

获取了 Azure Stack HCI 上的 Azure Kubernetes 服务公共预览版文件后,必须将 .nupkg 文件保存在本地或 SMB 共享上,并将文件路径添加到 Windows Admin Center 扩展管理器中的“源”列表。Once you have obtained the Azure Kubernetes Service on Azure Stack HCI public preview files, you must save the .nupkg file locally or to an SMB share and add the file path to the "Feeds" list in your Windows Admin Center extension manager. .nupkg 文件是包含 Windows Admin Center 扩展的 NuGet 包。The .nupkg file is a NuGet package that contains the Windows Admin Center extension.

若要访问现有扩展源,请打开 Windows Admin Center,并选择屏幕右上角的齿轮。To access your existing extension feed, open Windows Admin Center and select on the gear in the top right corner of the screen. 这会转到设置菜单。This will take you to the settings menu. 可以在“扩展”菜单中的“网关”部分下找到扩展源 。The extension feeds can be found under the Gateway section in the Extensions menu. 导航到“源”选项卡,然后选择“添加” 。Navigate to the Feeds tab and select Add. 在此窗格中,将文件路径粘贴到 Azure Stack HCI 上的 Azure Kubernetes 服务扩展的副本,然后选择“添加”。In this pane, paste the file path to your copy of the Azure Kubernetes Service on Azure Stack HCI extension and select Add. 如果成功添加了文件路径,则你会收到成功通知。If your file path was added successfully, you will receive a success notification.

现在我们已添加了源,Azure Stack HCI 上的 Azure Kubernetes 服务扩展会在可用扩展列表中提供。Now that we have added the feed, the Azure Kubernetes Service on Azure Stack HCI extension will be available in the list of available extensions. 选择此扩展后,选择表顶部的“安装”以安装此扩展。Once you have the extension selected, select Install at the top of the table to install this extension. 安装完成之后,Windows Admin Center 会重新加载。Windows Admin Center will reload after installation is complete.

Windows Admin Center 扩展管理器中的可用扩展列表的视图。 View of the available extension list in Windows Admin Center extension manager.

设置 Azure Kubernetes 服务主机Setting up an Azure Kubernetes Service host

创建 Kubernetes 群集之前,应完成最后一个步骤。There is one final step that should be completed before you create a Kubernetes cluster. 需要在要将 Kubernetes 群集部署到的系统上设置 Azure Kubernetes 服务主机。You need to set up an Azure Kubernetes Service host on the system you want to deploy the Kubernetes cluster to. 此系统必须是 Azure Stack HCI 群集。This system must be an Azure Stack HCI cluster.

备注

不支持为了在 Kubernetes 群集创建过程中进行合并,而在两个独立系统上设置 Azure Kubernetes 服务主机。Setting up Azure Kubernetes Service hosts on two independent systems with the intention of merging them during Kubernetes cluster creation is not a supported scenario.

可以使用新 Azure Kubernetes 服务工具完成此设置。This set up can be done using the new Azure Kubernetes Service tool.

此工具会安装和下载所需包,以及创建提供核心 Kubernetes 服务并协调应用程序工作负载的管理群集。This tool will install and download the necessary packages, as well as create a management cluster that provides core Kubernetes services and orchestrates application workloads.

使用此工具之前,请打开 PowerShell 并在每个节点上运行以下命令,以确保 Azure 登录未被任何计算机设置阻止:Before using this tool, open PowerShell and run the following command on each node to ensure Azure sign-in is not blocked by any machine settings:

az login

现在我们已验证了系统设置,接下来让我们开始使用吧:Now that we've verified our system settings, let's get started:

  1. 选择“设置”以启动设置向导。Select Set up to launch the set up wizard.

  2. 查看在运行 Windows Admin Center 的计算机、所连接到的 Azure Stack HCI 群集以及网络的先决条件。Review the prerequisites for the machine you are running Windows Admin Center on, the Azure Stack HCI cluster you're connected to, as well as the network. 此外,请确保已登录到 Windows Admin Center 上的 Azure 帐户,并且你计划使用的 Azure 订阅未过期。Additionally, make sure you're signed into an Azure account on Windows Admin Center and that the Azure subscription you're planning on using is not expired. 完成后,选择“下一步”。When you're finished, select Next.

  3. 在向导的“系统检查”页上,执行所有所需操作,例如将 Windows Admin Center 网关连接到 Azure。On the System checks page of the wizard, take any required actions, such as connecting your Windows Admin Center gateway to Azure. 此步骤会检查 Windows Admin Center 以及将托管 Azure Kubernetes 服务的系统是否具有可继续进行操作的适当配置。This step check that Windows Admin Center and the system that will host Azure Kubernetes Service have the proper configurations to continue. 操作执行完成后,选择“下一步”。When you're finished taking action, select Next.

  4. 在“主机配置”步骤中,配置将托管 Azure Kubernetes 服务的计算机。Configure the machine that will host Azure Kubernetes Service in the Host configuration step. 建议在此部分中选择自动下载更新。We recommend you select automatically download updates in this section. 完成后,选择“下一步”。Select Next after you're finished. 向导的此步骤要求配置以下详细信息:This step of the wizard asks you to configure the following details:

    • 主机详细信息,如管理群集的名称和用于存储 VM 映像的文件夹host details, such as a name for the management cluster and a folder to store VM images
    • VM 网络,将应用于为运行容器和协调容器管理而所创建的所有 Linux 和 Windows VM(节点)。VM networking, which will apply to all Linux and Windows VMs (nodes) that are created to run containers and orchestrate container management.
    • 负载均衡器设置,定义用于外部服务的地址池load balancer settings, which define the pool of addresses used for external services

    说明 Azure Kubernetes 服务主机向导的主机配置步骤。

  5. 在“Azure 注册”步骤中向 Azure 注册并选择将诊断数据发送给 Microsoft。Register with Azure and choose to send diagnostic data to Microsoft in the Azure registration step. 尽管此页面要求提供 Azure 订阅和资源组,但在公共预览版中设置和使用 Azure Kubernetes 服务不会产生费用。While this page asks for an Azure subscription and resource group, there is no cost for setting up and using Azure Kubernetes Service in public preview. 发送给 Microsoft 的诊断数据将用于帮助使服务保持安全和最新状态、对问题进行故障排除以及改进产品。The diagnostic data you send to Microsoft will be used to help keep the service secure and up to date, troubleshoot problems, and make product improvements. 进行选择之后,选择“下一步”。After you've made your selections, select Next.

  6. 在“审阅 + 创建”步骤中,审阅迄今为止进行的所有选择。Review all of your selections so far in the Review + create step. 如果对选择满意,请选择“设置”以开始设置主机。If you're satisfied with your selections, select Set up to begin host setup.

  7. 在“设置进度”页上,可以查看主机设置的进度。On the Setup progress page, you can watch the progress of your host setup. 此时,欢迎你在新选项卡中打开 Windows Admin Center 并继续执行管理任务。At this point, you are welcome to open Windows Admin Center in a new tab and continue your management tasks.

  8. 如果部署成功,则会显示后续步骤,并且会启用“完成”按钮。If the deployment succeeds, you will be presented with next steps and the Finish button will be enabled. 在“后续步骤”下选择“下载管理群集 kubeconfig”会开始下载,不会使你离开向导 。Selecting Download management cluster kubeconfig under Next Steps will begin a download and will not direct you away from the wizard.

后续步骤Next steps

在本快速指南中,你安装了 Windows Admin Center 和 Azure Stack HCI 的 Azure Kubernetes 服务扩展。In this quickstart, you installed Windows Admin Center and the Azure Kubernetes Service for Azure Stack HCI extension. 还在要将 Kubernetes 群集部署到的系统上配置了 Azure Kubernetes 服务主机。You also configured an Azure Kubernetes Service host on the system you are going to deploy a Kubernetes cluster to.

现在,你已准备好继续在 Windows Admin Center 中创建 Kubernetes 群集You are now ready to go ahead with creating a Kubernetes cluster in Windows Admin Center.