ACR to AKS deployment ERROR: The container operating system does not match the host operating system ACR to AKS deployment ERROR: The container operating system does not match the host operating system kubernetes kubernetes

ACR to AKS deployment ERROR: The container operating system does not match the host operating system


I had the problem, the issue was that my node in Kubernetes was running in Windows 2019 and my images was built with Windows 2016.

To check the Windows version for your image:

docker inspect <image>:<tag>

Then you can get nods with kubectl to view the Windows version of your node:

kubectl get nodes -o wide

To resolve it, I re-build my image from a Windows 2019 machine and then it worked from AKS.


I suppose the issue is with the fact AKS doesnt yet support windows nodes, so you dont really have windows nodes. You can create AKS with windows nodes, but its in preview at this point in time.

https://github.com/Azure/AKS/blob/master/previews.md#windows

If you have windows nodes, you'd need to make sure that the base image you are using matches the windows host os version

https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility


It seems you just need to change the apiVersion into apps/v1, then the pod will run well. I test the apiVersion as yours and also get the error "Back-off restarting failed container".