Kubernetes "Failed create pod sandbox" error when deploying services on Linux/Windows cluster Kubernetes "Failed create pod sandbox" error when deploying services on Linux/Windows cluster kubernetes kubernetes

Kubernetes "Failed create pod sandbox" error when deploying services on Linux/Windows cluster


This is a Windows dockeree specific error, the pause image can't be run by as it was built with the wrong OS base image.

The current version of the url you were following has a section on creating the pause image using powershell. The line:

docker build -t kubeletwin/pause .

Builds the pause image (based on nanoserver or windowsservercore) and tags as kubeletwin/pause.

What the instructions omit is that once you've built the pause image, you can test it by running on the node: docker run kubeletwin/pause.

If you get a container/host OS mismatch:

  • type dockerfile to get the base image type the image is using
  • For a RTM OS build run (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").ReleaseId to get the 4 digit host OS version
  • For an insider OS build, find the full build number e.g. 10.0.17677.1000, you will also have to add -insider to the base image type.

Then run the following to tag the correct OS base build to match the base image requested by the pause image:

docker pull microsoft\<base image type>:<version>docker tag microsoft\<base image type>:<version> microsoft\<base image type>:latestdocker build .docker run <image id from build>