profile
viewpoint

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: sigs.k8s.io/kind/pkg/errors.WithStack /src/pkg/errors/errors.go:51 sigs.k8s.io/kind/pkg/exec.(*LocalCmd).Run /src/pkg/exec/local.go:124 sigs.k8s.io/kind/pkg/cluster/internal/providers/docker.(*nodeCmd).Run /src/pkg/cluster/internal/providers/docker/node.go:146 sigs.k8s.io/kind/pkg/cluster/nodeutils.CopyNodeToNode /src/pkg/cluster/nodeutils/util.go:70 sigs.k8s.io/kind/pkg/cluster/internal/create/actions/kubeadminit.(*action).Execute /src/pkg/cluster/internal/create/actions/kubeadminit/init.go:95 sigs.k8s.io/kind/pkg/cluster/internal/create.Cluster /src/pkg/cluster/internal/create/create.go:135 sigs.k8s.io/kind/pkg/cluster.(*Provider).Create /src/pkg/cluster/provider.go:138 sigs.k8s.io/kind/pkg/cmd/kind/create/cluster.runE /src/pkg/cmd/kind/create/cluster/createcluster.go:91 sigs.k8s.io/kind/pkg/cmd/kind/create/cluster.NewCommand.func1 /src/pkg/cmd/kind/create/cluster/createcluster.go:56 github.com/spf13/cobra.(*Command).execute /go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842 github.com/spf13/cobra.(*Command).ExecuteC /go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 github.com/spf13/cobra.(*Command).Execute /go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887 sigs.k8s.io/kind/cmd/kind/app.Run /src/cmd/kind/app/main.go:53 sigs.k8s.io/kind/cmd/kind/app.Main /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: kind.x-k8s.io/v1alpha4 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
kubernetes-sigs/kind

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 https://github.com/kubernetes-sigs/kind/pull/1630

useful!

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