Windows version - base image it is not compatible with the host - windows version

hristijan 21 Reputation points
2021-09-29T14:25:57.893+00:00

Greetings,

I am trying to deploy windows container using AKS cluster with windows node pools. The application is dotnet asp which uses .Net Framework, for getting the image ready I use these two in the Dockerfile:

FROM mcr.microsoft.com/dotnet/framework/sdk:4.8 AS build
steps..
FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8 AS runtime
steps..

Once I had it locally running I uploaded it on Azure Container Registry, from there I am deploying it to AKS cluster which has Windows node pools. This is how i created the cluster link. Once I created the cluster I applied the k8s manifests. For pulling th ACR image from the private registry I use k8s secret from the admin user of the ACR link.

Once the pod is running I am getting the following log in the pod:

pc error: code = Unknown desc = a Windows version 10.0.19042-based image is incompatible with a 10.0.17763 host, rpc error: code = Unknown desc = Error response from daemon: Head https://***api/manifests/v1: unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information.    

How would i overcome this problem with the Windows versions?
Why am I not authorized to perform this action?

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
424 questions
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,977 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,571 questions
0 comments No comments
{count} votes

Accepted answer
  1. KarishmaTiwari-MSFT 18,852 Reputation points Microsoft Employee
    2021-09-30T01:31:27.82+00:00

    There are a few things that can be checked for this issue:

    1. Issue could be with the version of docker you are using to build the image as described here: https://devops.stackexchange.com/questions/9990/pulling-windows-base-images-fails
      136455-image.png
    2. I also came across a GitHub issue which talks about the exact error you were getting: https://github.com/MicrosoftDocs/azure-docs/issues/49705#issuecomment-596678400
      The recommendation was :
      136512-image.png

    Please go through these and see if that helps. If not, let me know and I can further investigate and include the right teams to look into it. Thanks.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. hristijan 21 Reputation points
    2021-10-01T14:18:02.333+00:00

    Hi,

    Thanks for you help, with the second approach the pod started running!!

    Now I have some other issue the service is unavailable, obviously it is .NET Framework related issue when working on k8s because the same docker image runs well and it is available on WebApp Service.

    Thanks again!

    0 comments No comments