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

kind cluster creation fails with WSL2 #5604

Open
AnhQuanTrl opened this issue Sep 28, 2023 · 3 comments
Open

kind cluster creation fails with WSL2 #5604

AnhQuanTrl opened this issue Sep 28, 2023 · 3 comments
Labels
kind/bug Something isn't working parity/project Feature is available from other projects platform/windows runtime/moby triage/confirmed Issue has been reproduced by dev team

Comments

@AnhQuanTrl
Copy link

Actual Behavior

I tried to create a kind cluster inside WSL 2 with Rancher Desktop and get the following error:

Creating cluster "tkb" ...
 βœ“ Ensuring node image (kindest/node:v1.28.0) πŸ–Ό
 βœ“ Preparing nodes πŸ“¦ πŸ“¦ πŸ“¦ πŸ“¦
 βœ— Writing configuration πŸ“œ
Deleted nodes: ["tkb-control-plane" "tkb-worker2" "tkb-worker" "tkb-worker3"]
ERROR: failed to create cluster: failed to generate kubeadm config content: failed to get kubernetes version from node: file should only be one line, got 0 lines

Steps to Reproduce

  1. Install Rancher Desktop and WSL2
  2. Enable WSL integration in Rancher Desktop.
  3. Inside Ubuntu WSL2, install kind.
  4. Run kind create cluster --config cluster-config.yml
    Here is my cluster-config.yml:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: tkb
networking:
  ipFamily: dual
nodes:
- role: control-plane
  image: kindest/node:v1.28.0
  extraPortMappings:
  - containerPort: 30001
    hostPort: 8083
    protocol: TCP
- role: worker
  image: kindest/node:v1.28.0
- role: worker
  image: kindest/node:v1.28.0
- role: worker
  image: kindest/node:v1.28.0

Result

I got this error: ERROR: failed to create cluster: failed to generate kubeadm config content: failed to get kubernetes version from node: file should only be one line, got 0 lines

Expected Behavior

kind should be able to create a cluster.

Additional Information

I took a look at kind repository and found a similar issue: kubernetes-sigs/kind#3010. It seems the kind folks redirected the original poster here. I had the exact problem so figures I should post it here first.

Rancher Desktop Version

1.10.0

Rancher Desktop K8s Version

1.28.1

Which container engine are you using?

moby (docker cli)

What operating system are you using?

Windows

Operating System / Build Version

Window 11 Pro 22H2. WSL 2 Ubuntu 22.04.2

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

None

Windows User Only

No response

@AnhQuanTrl AnhQuanTrl added the kind/bug Something isn't working label Sep 28, 2023
@gunamata
Copy link
Contributor

I could reproduce the issue on my Windows 10 with the steps given in the issue description.
Just running kind create cluster produces the same error as well.

@gunamata gunamata added the triage/confirmed Issue has been reproduced by dev team label Oct 13, 2023
@jandubois
Copy link
Member

This is a duplicate of #5092.

@jandubois jandubois added triage/duplicate This issue or pull request already exists and removed triage/confirmed Issue has been reproduced by dev team labels Oct 13, 2023
@jandubois
Copy link
Member

Sorry, I was mistaken, #5092 is about macOS, where kind fails due to a different reason.

@jandubois jandubois reopened this Oct 13, 2023
@jandubois jandubois added triage/confirmed Issue has been reproduced by dev team runtime/moby parity/project Feature is available from other projects and removed triage/duplicate This issue or pull request already exists labels Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working parity/project Feature is available from other projects platform/windows runtime/moby triage/confirmed Issue has been reproduced by dev team
Projects
None yet
Development

No branches or pull requests

4 participants