Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
485 views
in Technique[技术] by (71.8m points)

azure - How to create a Windows node pool in AKS cluster?

I'm trying to add a node pool that can run Windows based containers. What I see in Azure portal is a disabled option to select Windows as the OS. The hint says: 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?

enter image description here

question from:https://stackoverflow.com/questions/66067014/how-to-create-a-windows-node-pool-in-aks-cluster

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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. 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.

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 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:

# 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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...