Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HA cluster with kind on Windows errors on copying certificate. #1555

Closed
nielsvbrecht opened this issue May 4, 2020 · 3 comments · Fixed by #1630
Closed

HA cluster with kind on Windows errors on copying certificate. #1555

nielsvbrecht opened this issue May 4, 2020 · 3 comments · Fixed by #1630
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@nielsvbrecht
Copy link

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/[email protected]/command.go:842
github.com/spf13/cobra.(*Command).ExecuteC
/go/pkg/mod/github.com/spf13/[email protected]/command.go:950
github.com/spf13/cobra.(*Command).Execute
/go/pkg/mod/github.com/spf13/[email protected]/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
@nielsvbrecht nielsvbrecht added the kind/bug Categorizes issue or PR as related to a bug. label May 4, 2020
@BenTheElder
Copy link
Member

/assign

@BenTheElder
Copy link
Member

BenTheElder commented May 28, 2020

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... 🤦‍♂️

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 #1630

@nielsvbrecht
Copy link
Author

We are (at least) lucky enough to be learning everyday ;)
Thanks for identifying the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants