Getting 'didn't match node selector' when running Docker Windows container in Azure AKS

2/28/2019

In my local machine I created a Windows Docker/nano server container and was able to 'push' this container into an Azure Container Registry using this command (The reason why I had to use the Windows container is because I have to use CSOM in the ASP.NET Core and it is not possible in Linux)

docker push MyContainerRegistry.azurecr.io/myimage:v1

That Docker container IS visible inside the Azure container registry which is MyContainerRegistry

I know that in order to run it I have to create a Container Instance; however, our management team doesn't want to go with that path and wants to use AKS instead

We do have an AKS cluster created

The kubectl IS running in our Azure shell

I tried to create an AKS pod using this command

kubectl apply -f myyaml.yaml

These are contents of yaml file

apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: mypod
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: mypod
    spec:
      containers:
      - name: mypod
        image: MyContainerRegistry.azurecr.io/itataxsync:v1
        ports:
        - containerPort: 80
      imagePullSecrets:
      - name: mysecret
      nodeSelector: 
          beta.kubernetes.io/os: windows

The pod successfully created.

When I run 'get pods' I see a newly created pod

However, when I get into details of this pod, I see the following

"Warning FailedScheduling 3m (x2 over 3m) default-scheduler 0/3 nodes are available: 3 node(s) didn't match node selector."

Does it mean that I simply can't run Docker Windows container in Azure using AKS?

Is there any way I can run Docker Windows container in Azure at all?

Thank you very much for your help!

-- Mikhail
azure
docker
kubernetes

1 Answer

3/1/2019

You cannot yet have windows nodes on AKS, you can, however, use AKS engine (examples).

Bear in mind that windows support in kubernetes is a bit lacking, so you will run into issues, unfortunately.

-- 4c74356b41
Source: StackOverflow