How can I use the windows kubernetes image through Jenkins?

37 Views Asked by At

I am trying to create a daemonset using the image

FROM mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0

following the following documentation https://samcogan.com/using-host-process-containers-to-interact-with-kubernetes-windows-nodes/ ; However, when trying to create the container I receive the following

error re-exec error: exit status 1: output: hcsshim::ImportLayer - failed failed in Win32: The configuration registry database is corrupt. (0x3f1).

According to my research I found that the error was probably because it must be built with BuildKit but when trying to do so I received the following

ERROR error: BuildKit is enabled but the buildx component is missing or broken. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/buildx/

I assume that it is considered that the assembly is carried out through a pipeline within a Jenkins environment and I have tried multiple commands to install it in both sh and powershell, does anyone know how to solve this problem?

It is also important to consider that I am able to correctly assemble the container using the following image without needing BuiltKit

FROM mcr.microsoft.com/powershell:lts-nanoserver-1809

The goal is to use the specialized image for Kubernetes in order to use only the necessary Windows resources

0

There are 0 best solutions below