kind: WSL2 ERROR: failed to create cluster
ERROR: failed to create cluster: ERROR: failed to create cluster: failed to init node with kubeadm: command “docker exec --privileged kind-control-plane kubeadm init --skip-phases=preflight --config=/kind/kubeadm.conf --skip-token-print --v=6” failed with error: exit status 1 Command Output: I0622 15:16:13.468494 216 initconfiguration.go:246] loading configuration from “/kind/kubeadm.conf”
What is Expected: cluster should be created without any error.
How to reproduce it: run below command to reproduce it : $ kind create cluster
Anything else we need to know?: I have recently install ubuntu as virtual machine on windows 10 as wsl 2. running ubuntu on windows terminal as admin user, also installed docker and set it as non root user. below I am providing environment related information.
ENVIRONMENT:
Ubuntu
command used $lsb_release -a
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04 Codename: focal
Kubectl Installation https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#install-using-native-package-management
Kubectl Version
command used kubectl version --client
Client Version: version.Info{ Major:“1”, Minor:“21”, GitVersion:“v1.21.2”, GitCommit:“092fbfbf53427de67cac1e9fa54aaa09a28371d7”, GitTreeState:“clean”, BuildDate:“2021-06-16T12:59:11Z”, GoVersion:“go1.16.5”, Compiler:“gc”, Platform:“linux/amd64” }
kind Installtion :
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64 chmod +x ./kind sudo mv ./kind /usr/local/bin/kind
kind version: :
command used $kind version
kind v0.11.1 go1.16.4 linux/amd64
docker info
command used $docker info
Client: Context: default Debug Mode: false Plugins: app: Docker App (Docker Inc., v0.9.1-beta3) buildx: Build with BuildKit (Docker Inc., v0.5.1-docker) scan: Docker Scan (Docker Inc., v0.8.0)
Server: Containers: 1 Running: 0 Paused: 0 Stopped: 1 Images: 2 Server Version: 20.10.7 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true userxattr: false Logging Driver: json-file Cgroup Driver: cgroupfs Cgroup Version: 1 Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Swarm: inactive Runtimes: runc io.containerd.runc.v2 io.containerd.runtime.v1.linux Default Runtime: runc Init Binary: docker-init containerd version: d71fcd7d8303cbf684402823e425e9dd2e99285d runc version: b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7 init version: de40ad0 Security Options: seccomp Profile: default Kernel Version: 5.4.72-microsoft-standard-WSL2 Operating System: Ubuntu 20.04.2 LTS OSType: linux Architecture: x86_64 CPUs: 12 Total Memory: 6.133GiB Name: LAPTOP-TN6NO0LS ID: JDCK:NRQ2:ML5P:EUMK:OBYG:76PM:5SXD:FMYK:KHCX:NDTB:IQ4R:KIBJ Docker Root Dir: /var/lib/docker Debug Mode: false Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false
WARNING: No blkio throttle.read_bps_device support WARNING: No blkio throttle.write_bps_device support WARNING: No blkio throttle.read_iops_device support WARNING: No blkio throttle.write_iops_device support
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 46 (30 by maintainers)
Commits related to this issue
- Removing WSL2 workaround For details see https://github.com/kubernetes-sigs/kind/issues/2323 and https://github.com/kubernetes-sigs/kind/pull/2390 — committed to networkop/tkng-labs by networkop 3 years ago
- fix https://github.com/kubernetes-sigs/kind/issues/2323#issuecomment-995593199 for wsl2. — committed to ScoreTrak/helm-charts by L1ghtman2k 3 years ago
- Update scoretrak server (#19) * update scoretrak+server helm chart * update scoretrak+server helm chart * upgrade versions * upgrade versions * upgrade versions * upgrade versions *... — committed to ScoreTrak/helm-charts by L1ghtman2k 3 years ago
for those still experiencing this issue on
kind v0.11.1
, the following word for me:kind create cluster --image kindest/node:v1.23.0
In WSL2 I’m running Ubuntu 20.04
Running 1.17.17 image finally worked for me
kind create cluster --config=cluster.yaml --image kindest/node:v1.17.17
Yep I have extfs too
It’s not something I’ve ever even thought about until now
I’m trying the config suggested and still not having any luck
This is the config I’m using with
kind create cluster --config=cluster.yaml
config.yaml
still getting the issue on WSL2 😦
Same problem, also following the steps on the WSL2 page kind v0.11.1 with image kindest/node:v1.21.1
Kind used to work in the past on WSL2 😢
This is a regression in v0.11.X, it is fixed in the latest sources, and it is not present in previous releases.
You can use an older release or build from the latest sources (clone the repo in WSL/linux/macOS, run
make build
, the binary will be inbin/kind
).All Kubernetes distros I’m aware of use systemd. Here we had a bug triggered when systemd was not used on the host machine.
After the regression fix systemd is not required in the host environment but it is and will continue to be used within the Kubernetes node containers by KIND and within the Kubernetes nodes by every other major Kubernetes distro because it is free software that performs the init / PID1 task well.
Nearly all major linux distros use systemd and Kubernetes upstream is developed exclusively with systemd, so tricky system interactions like this can go uncaught.
Testing every possible combination of system software is prohibitive and Kubernetes’s CI and GitHub actions lack support for Windows (nested) virtualization so WSL2 CI is not available. #1529 If you’re interested in solving this.
I hope you are feeling well again, sorry to hear that you and your family had some sadness 😞 .
Personally I wouldn’t even begin to know where to start with #1529. But thank you for the link to the milestone - I will take a look. (I don’t know Go yet, but everyone has to start somewhere 🙂 )
@aojea and I are the two active maintainers right now. There are only a few recurring contributors and maintainers.
Of those, none of us work on KIND exclusively / full-time at this point. KIND is not commercial software.
I myself also chair + tech lead Kubernetes SIG Testing, co- or solo- maintain many other parts of the Kubernetes project, and I have other work at my job. I’ve been out some since the last release due to sick and dying/dead family. I’ve tried to make myself available to review PRs and potentially cut the release when it’s ready, but I haven’t been able to finish fixing the outstanding regressions.
Unfortunately, throughout the Kubernetes project you will find that the bugs / issues and work required outpace the consistently available developer time. I’ve had to pick up the slack more in other critical areas, and I’m working on finding people to take over some of those.
This is not the issue, there is build tooling - though we do more than that and organize and write up the changes, emphasizing the most notable ones to make upgrades easier, that takes maybe an afternoon.
In this repo we track releases in milestones, like much of the rest of the Kubernetes organization.
There are outstanding regressions that will notably affect users, so we have not released.
Incoming changes that “fix” things have caused more regressions. It is not so simple to cover supporting all these things, as mentioned last time I commented in this thread: for Windows we do not have CI for and nobody has helped resolve that #1529. As a result regressions to e.g. Windows quirks are difficult to catch (or in this case rootless which we did add CI for, but now linux without /dev/fuse is hit due to the rootless fixes … ).
As Antonio linked above, the v0.12.0 milestone shows what remains before we’re ready for a general v0.12.0 release.
If you’re happy with the current state and won’t be affected by these, it is trivial to obtain a binary, but it will not be a supported release on our part due to these outstanding issues.
I have only been accepting fix PRs and documentation improvements, but we’re not there yet, and there is no ETA.
If folks are interested in helping work on these problems, we have a detailed contributor guide.
2 outstanding issues https://github.com/kubernetes-sigs/kind/milestone/15 for release 😦
we want to do it soon, but I can’t promise anything, unfortunately we are being very busy this days
next version 0.12.0, or you can use kind from HEAd
Experiencing the same issue, and yes I followed the instructions on the WSL2 page. https://kind.sigs.k8s.io/docs/user/using-wsl2/
docker info
kind create cluster --retain
kind export logs
757334508.zip