简体   繁体   English

如何在 AKS 集群中创建 Windows 节点池?

[英]How to create a Windows node pool in AKS cluster?

I'm trying to add a node pool that can run Windows based containers.我正在尝试添加一个可以运行基于 Windows 的容器的节点池。 What I see in Azure portal is a disabled option to select Windows as the OS.我在 Azure 门户中看到的是 select Windows 作为操作系统的禁用选项。 The hint says: Windows node pools require a Windows authentication profile .提示说: Windows node pools require a Windows authentication profile I tried googling the possible solution but found nothing.我尝试搜索可能的解决方案,但一无所获。

How can I provide the Windows authentication profile to the existing AKS cluster to make AKS run Windows based containers?如何向现有 AKS 群集提供 Windows 身份验证配置文件以使 AKS 运行基于 Windows 的容器?

在此处输入图像描述

Looks like there is an open issue regarding this situation.看起来关于这种情况有一个未解决的问题。

The problem is while creating the cluster for the first time, you didn't provide any --windows-admin-password and --windows-admin-username .问题是在第一次创建集群时,您没有提供任何--windows-admin-password--windows-admin-username Therefore, when you try to create a new windows node pool that will create VM's, The VM's don't have any Windows authentication profile .因此,当您尝试创建将创建 VM 的新 windows 节点池时,VM 没有任何Windows authentication profile

If you look at the cluster resource az aks show and don't see the Window profile, then you would have to create a new cluster, for example using AZ CLI :如果您查看集群资源az aks show并没有看到 Window 配置文件,那么您必须创建一个新集群,例如使用AZ CLI

az aks create -g MyResourceGroup -n MyManagedCluster --load-balancer-sku Standard --network-plugin azure --windows-admin-username azure --windows-admin-password 'replacePassword1234$'

If you created your cluster using terraform, you can add this section:如果您使用 terraform 创建了集群,则可以添加此部分:

# Create AKS Cluster
resource "azurerm_kubernetes_cluster" "akscluster" {

# Code goes here..

  windows_profile {
    admin_username    = "azure"
    admin_password    = "azure"
  }
}

Pay attention to this thread as well.也要注意这个线程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM