Ask questionsHA cluster with kind on Windows errors on copying certificate.

What happened: When i try to create a cluster with three control-plane nodes I get an error on copying the ca certificate to the 2nd control plane node.

ERROR: failed to create cluster: failed to copy admin kubeconfig: failed to write "/etc/kubernetes/pki/ca.crt" to node: command "docker exec --privileged -i cluster1-control-plane2 cp /dev/stdin /etc/kubernetes/pki/ca.crt" failed with error: exit status 1

Command Output: cp: cannot create regular file '/etc/kubernetes/pki/ca.crt': No such file or directory

Stack Trace: /src/pkg/errors/errors.go:51*LocalCmd).Run /src/pkg/exec/local.go:124*nodeCmd).Run /src/pkg/cluster/internal/providers/docker/node.go:146 /src/pkg/cluster/nodeutils/util.go:70*action).Execute /src/pkg/cluster/internal/create/actions/kubeadminit/init.go:95 /src/pkg/cluster/internal/create/create.go:135*Provider).Create /src/pkg/cluster/provider.go:138 /src/pkg/cmd/kind/create/cluster/createcluster.go:91 /src/pkg/cmd/kind/create/cluster/createcluster.go:56*Command).execute /go/pkg/mod/*Command).ExecuteC /go/pkg/mod/*Command).Execute /go/pkg/mod/ /src/cmd/kind/app/main.go:53 /src/cmd/kind/app/main.go:35 main.main /src/main.go:25 runtime.main /usr/local/go/src/runtime/proc.go:203 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1373

What you expected to happen: A multi-master deployed kind cluster

How to reproduce it (as minimally and precisely as possible): << config >> kind: Cluster apiVersion: nodes:

  • role: control-plane
  • role: control-plane
  • role: control-plane
  • role: worker
  • role: worker
  • role: worker << /config >>

command: kind create cluster --config config.yaml

Anything else we need to know?: -Docker is running in Linux mode -Single master cluster and multiple workers goes fine

Environment: Windows 10 Pro

  • kind version: 0.8.1:
  • Kubernetes version: 1.18.2:
  • Docker version: 19.03.8:
  • OS: Windows 10 Professional

Answer questions BenTheElder

This doesn't make much sense, we mkdir -p the directory before ...

... except that we use filepath package, which uses the hosts's path formats... :man_facepalming:

We've been pretty good about this, but it's easy to slip up, usually it would be more correct to use filepath for file paths (shocker!) than path but ... not in this case. we need #1529

fix in


Related questions

Cluster not starting with DIND setup hot 1
Appears when using ceph of roook: map failed: (30) Read-only file system hot 1
Errors compile: version "go1.12.1" does not match go tool version "go1.10.2" hot 1
Installing Istio fails when trying to match resources hot 1
Helm: rabbitmq-ha deployment fails to discover k8s nodes hot 1
`kind` should be able to start the control plane when `/dev/kmsg` is not available hot 1
WSLv1: No DNS between pods or to the internet hot 1
Github User Rank List