I have a private Azure Container registry that contains two containers, a windows based (mcr.microsoft.com/dotnet/core/samples:aspnetapp) and a linux based (a custom test). I created a secret etc. which seems ok. When I try to deploy those with kubernetes the following happens:

  • The linux based from the private repo starts normally
  • The windows based container from docker hub starts normally
  • The SAME windows based container from the private repo throws an error : Back-off pulling image "spintheblackcircleshop.azurecr.io/aspnetapp"

Anyone?

-

test.yaml:

apiVersion: v1
items:

# basplus deployment

- apiVersion: apps/v1beta1
  kind: Deployment
  metadata:
    name: aspnetapp-private
  spec:
    replicas: 1
    template:
      metadata:
        labels:
          app: private
      spec:
        terminationGracePeriodSeconds: 100
        containers:
        - name: xxx
          image: spintheblackcircleshop.azurecr.io/aspnetapp
        imagePullSecrets:
          - name: mysecret

- apiVersion: apps/v1beta1
  kind: Deployment
  metadata:
    name: aspnetapp-public
  spec:
    replicas: 1
    template:
      metadata:
        labels:
          app: public
      spec:
        terminationGracePeriodSeconds: 100
        containers:
        - name: xxx
          image: mcr.microsoft.com/dotnet/core/samples:aspnetapp
        imagePullSecrets:
          - name: mysecret


- apiVersion: apps/v1beta1
  kind: Deployment
  metadata:
    name: aspnetapp-private-sleep
  spec:
    replicas: 1
    template:
      metadata:
        labels:
          app: private-sleep
      spec:
        terminationGracePeriodSeconds: 100
        containers:
        - name: xxx
          image: spintheblackcircleshop.azurecr.io/danielm-test-sleep
        imagePullSecrets:
          - name: mysecret

# end

kind: List
metadata: {}

2 Answers

0
Charles Xu On Best Solutions

Well, AKS does not support windows node currently, but you can just run windows container in it when you install the virtual kubelet in the AKS. It takes advantage of the ACI.

See the steps that install the virtual kubelet and run windows container in the document Use Virtual Kubelet with Azure Kubernetes Service (AKS).

3
4c74356b41 On

AKS doesnt support windows nodes yet. There is no way to run windows containers in AKS at the time of writing (05/05/2019).

edit: fair point raised by the other answer. you actually can run windows containers in aci in aks, but it's not exactly in aks :)