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.
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.
Unfortunately, Windows container is not yet supported on AKS.