1

I have created an AKS kubernetes cluster with az CLI :

az aks create \
    --name abcdefAKSCluster \
    --resource-group abcdef \
    --node-count 5 \
    --generate-ssh-keys \
    --service-principal <...> \
    --client-secret <...> \
    --location westeurope

(I followed the steps on this documentation)

I deployed a bunch of docker, based on unix images. Everything works fine (nestjs and angular apps, but this is not relevant).

Now I have the requirement to deploy a docker image, but based on windows. This image is built and uploaded to our azure container registry. I want to run this image in the kubernetes azure cluster. But for that, I need, somehow, to tell kubernetes to run this docker inside a windows-based node.

So I've found in this blog post that I need to have a osType:windows entry in the agentPoolProfiles array of json describing the cluster. When the cluster will have a windows agent pool profile, I guess I'll be able to tell kubernetes to target a windows-based machine to run this windows-based docker image. Not sure about how to implement that last bit though...

Anyway my question is how to update an existing AKS cluster on azure to add a windows machine ? It seems this is not doable either with the az CLI nor with the azure portal UI.

Thanks.

Dawny33
  • 10,543
  • 21
  • 82
  • 134
Marcel Falliere
  • 1,884
  • 21
  • 39
  • 1
    With the answer of @Weinong, it not be supported on Azure, maybe you can take a try of ACS with the guide [here](https://learn.microsoft.com/en-us/azure/container-service/kubernetes/container-service-kubernetes-windows-walkthrough). – Charles Xu Sep 06 '18 at 01:50

2 Answers2

2

Unfortunately, Windows container is not yet supported on AKS.

Weinong Wang
  • 146
  • 3
0

Windows containers are now in preview. You have to add a Windows Server node pool like this:

az aks nodepool add \
  --resource-group myResourceGroup \
  --cluster-name myAKSCluster \
  --os-type Windows \
  --name npwin \
  --node-count 1 \
  --kubernetes-version 1.14.0

More information here.

sirdank
  • 3,351
  • 3
  • 25
  • 58