【问题标题】:How to create a Windows node pool in AKS cluster?如何在 AKS 群集中创建 Windows 节点池?
【发布时间】:2021-02-11 05:32:20
【问题描述】:

我正在尝试添加一个可以运行基于 Windows 的容器的节点池。我在 Azure 门户中看到的是选择 Windows 作为操作系统的禁用选项。提示说:Windows node pools require a Windows authentication profile。我尝试搜索可能的解决方案,但一无所获。

如何向现有 AKS 群集提供 Windows 身份验证配置文件以使 AKS 运行基于 Windows 的容器?

【问题讨论】:

    标签: azure kubernetes azure-aks


    【解决方案1】:

    看起来有一个 open issue 与这种情况有关。

    问题是在第一次创建集群时,您没有提供任何--windows-admin-password--windows-admin-username。因此,当您尝试创建将创建 VM 的新 windows 节点池时,VM 没有任何Windows authentication profile

    如果您查看集群资源 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$'
    

    如果您使用 terraform 创建了集群,则可以添加此部分:

    # Create AKS Cluster
    resource "azurerm_kubernetes_cluster" "akscluster" {
    
    # Code goes here..
    
      windows_profile {
        admin_username    = "azure"
        admin_password    = "azure"
      }
    }
    

    也请注意这个thread

    【讨论】:

    • 如果你启用--windows-admin-username,你还能做一个Linux工作池,这样你就可以覆盖这两种情况了吗?
    • @FilBot3 有道理,但我从未测试过。
    猜你喜欢
    • 2018-06-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-22
    • 2020-12-07
    相关资源
    最近更新 更多