# Windows Server 2019 Add Worker Node Problem

**URL:** <https://discuss.kubernetes.io/t/windows-server-2019-add-worker-node-problem/19423>\
**Category:** Windows\
**Created:** [March 22, 2022, 9:41am UTC](https://discuss.kubernetes.io/t/windows-server-2019-add-worker-node-problem/19423 "2022-03-22T09:41:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![justadeveloper](https://avatars.discourse-cdn.com/v4/letter/j/a4c791/32.png) [@justadeveloper](https://discuss.kubernetes.io/u/justadeveloper)\
**Post date:** [March 22, 2022, 9:41am UTC](https://discuss.kubernetes.io/t/windows-server-2019-add-worker-node-problem/19423/1 "2022-03-22T09:41:20Z")

</div>

I try to add a Kubernetes worker node on Windows Server 2019. I created a master node on Hyper-V virtual machine using Ubuntu 20.04 LTS sucessfully. On windows, firstly, I installed Docker, then I used the command below from the link [Adding Windows nodes | Kubernetes](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/).

```auto
curl.exe -LO https://raw.githubusercontent.com/kubernetes-sigs/sig-windows-tools/master/kubeadm/scripts/PrepareNode.ps1
.\PrepareNode.ps1 -KubernetesVersion v1.23.0 

```

I got the below error from command line although I installed docker successfully and started docker service.

```auto
PrepareNode.ps1 : Docker service was not detected - please install start Docker before calling Pre
pareNode.ps1 with -ContainerRuntime Docker
At line:2 char:1
+ .\PrepareNode.ps1 -KubernetesVersion v1.23.0
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,PrepareNode.ps1

```

How to solve the problem? Thanks in advance

**EDIT:**

Docker Engine works well, service started and I can run containers, but when I write this command on the command line, I get the below error:

```auto
docker -H npipe:////./pipe/docker_engine version

```

Output:

```auto
Client: Docker Engine - Enterprise
 Version: 19.03.5
 API version: 1.40
 Go version: go1.12.12
 Git commit: 2ee0c57608
 Built: 11/13/2019 08:00:16
 OS/Arch: windows/amd64
 Experimental: false
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/version: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

```

---

<div class="post-metadata">

**Author:** ![vrapolinario](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/vrapolinario/32/10963_2.png) [@vrapolinario](https://discuss.kubernetes.io/u/vrapolinario)\
**Post date:** [October 6, 2022, 7:54pm UTC](https://discuss.kubernetes.io/t/windows-server-2019-add-worker-node-problem/19423/2 "2022-10-06T19:54:53Z")

</div>

Is there a particular reason you want to use Docker as the runtime? ContainerD seems to be the containe runtime of choice for K8s these days. In any case, did you install Docker on the Windows Server 2019 node following the scripts from the Microsoft documentation? [Prep Windows operating system containers | Microsoft Learn](https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment?tabs=dockerce#windows-server-1)
