I have the same problem as issue #2789. I've been trying to get K8s running with Docker, but only had partial success, so I decided to start over with a clean image and try nerdctl to see if that worked any better.
My setup versions are: WSL2, Ubuntu image 22.04, Windows version 21H2 19044.1889, Rancher Desktop 1.5.1 and K8s 1.2.4. I wanted to keep it clean, so I didn't mess with the configuration, just updated and installed net-tools.
Given the issues I had previously, install seemed to work best when I had shutdown WSL, so I did that before running the installer. Docker Desktop for Windows was not running during install, or after.
ifconfig showed the following and I was able to ping all of the IPv4 addresses, which is a good sign:
johnl@DESKTOP-FDQ7CV5:~$ ifconfig
cni0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet 10.42.0.1 netmask 255.255.255.0 broadcast 10.42.0.255
inet6 fe80:
24a448ff
fe038d74 prefixlen 64 scopeid 0x20<link>
ether 26
a448
038d:74 txqueuelen 1000 (Ethernet)
RX packets 7799 bytes 1590224 (1.5 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8997 bytes 2390098 (2.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.21.211.86 netmask 255.255.240.0 broadcast 172.21.223.255
inet6 fe80:
2155dff
fe57df78 prefixlen 64 scopeid 0x20<link>
ether 00
155d
57df:78 txqueuelen 1000 (Ethernet)
RX packets 36032 bytes 48580939 (48.5 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5730 bytes 4888506 (4.8 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
flannel.1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet 10.42.0.0 netmask 255.255.255.255 broadcast 0.0.0.0
inet6 fe80:
8c2134ff
fe02bbf3 prefixlen 64 scopeid 0x20<link>
ether 8e
2134
02bb:f3 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 5 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 24491 bytes 9588503 (9.5 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 24491 bytes 9588503 (9.5 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth19feb9db: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet6 fe80:
f0c75ff
fec48363 prefixlen 64 scopeid 0x20<link>
ether f2
c705
c483:63 txqueuelen 0 (Ethernet)
RX packets 1331 bytes 126849 (126.8 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1432 bytes 151731 (151.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth861b7861: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet6 fe80:
c8fbff
fec06e9 prefixlen 64 scopeid 0x20<link>
ether 0e
8f0b
c006:e9 txqueuelen 0 (Ethernet)
RX packets 70 bytes 6594 (6.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 141 bytes 17002 (17.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vethb280045d: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet6 fe80:
242bcfff
fe97e683 prefixlen 64 scopeid 0x20<link>
ether 26
2bcf
97e6:83 txqueuelen 0 (Ethernet)
RX packets 4297 bytes 1104056 (1.1 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5137 bytes 821957 (821.9 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vethb8af9501: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet6 fe80:
14891aff
fe2d9364 prefixlen 64 scopeid 0x20<link>
ether 16
891a
2d93:64 txqueuelen 0 (Ethernet)
RX packets 1637 bytes 112622 (112.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1667 bytes 114870 (114.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vethf6daaa16: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet6 fe80:
e4c14cff
fe22b51b prefixlen 64 scopeid 0x20<link>
ether e6
c14c
22b5:1b txqueuelen 0 (Ethernet)
RX packets 1223 bytes 106457 (106.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1756 bytes 215304 (215.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
The installation instructions indicate that Helm, kubectl, nerdctl, Moby, Docker Compose will be available after install. When I ran kubectl version, it wasn't found and downloaded the latest version (I hope this doesn't cause issues). Here's the output when I checked on the other apps:
johnl@DESKTOP-FDQ7CV5:~/hello-world$ nerdctl build --tag helloworld:v1.0 .
WARN[0000] lstat /sys/fs/cgroup/rancher-desktop/run/nerdctl-tmp.986227269/input.1118623100/Dockerfil
e: no such file or directory, using Containerfile as fallback
FATA[0000] lstat /sys/fs/cgroup/rancher-desktop/run/nerdctl-tmp.986227269/input.1118623100/Container
file: no such file or directory
johnl@DESKTOP-FDQ7CV5:~/hello-world$ helm version
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/johnl/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /home/johnl/.kube/config
version.BuildInfo{Version:"v3.9.1", GitCommit:"a7c043acb5ff905c261cfdc923a35776ba5e66e4", GitTreeState:"clean", GoVersion:"go1.17.5"}
johnl@DESKTOP-FDQ7CV5:~/hello-world$ moby version
Command 'moby' not found, did you mean:
command 'goby' from deb goby-java (3.3.1+dfsg2-7)
Try: sudo apt install <deb name>
johnl@DESKTOP-FDQ7CV5:~/hello-world$ docker version
The command 'docker' could not be found in this WSL 2 distro.
We recommend to activate the WSL integration in Docker Desktop settings.
For details about using Docker Desktop with WSL 2, visit:
https://docs.docker.com/go/wsl2/
johnl@DESKTOP-FDQ7CV5:~/hello-world$ docker-compose version
The command 'docker-compose' could not be found in this WSL 2 distro.
We recommend to activate the WSL integration in Docker Desktop settings.
For details about using Docker Desktop with WSL 2, visit:
https://docs.docker.com/go/wsl2/
johnl@DESKTOP-FDQ7CV5:~$ containerd version
Command 'containerd' not found, but can be installed with:
sudo apt install containerd
Here are the results when I check for the apps in rancher-desktop:
~ # helm version
version.BuildInfo{Version:"v3.9.1", GitCommit:"a7c043acb5ff905c261cfdc923a35776ba5e66e4", GitTreeState:"clean", GoVersion:"go1.17.5"}
~ # nerdctl version
Client:
Version: v0.22.2
OS/Arch: linux/amd64
Git commit: 2899222cb0715f1e5ffe356d10c3439ee8ee3ba4
buildctl:
Version: v0.10.3
GitCommit: c8d25d9a103b70dc300a4fd55e7e576472284e31
FATA[0000] cannot access containerd socket "/run/containerd/containerd.sock": no such file or directory
~ # moby version
-sh: moby: not found
~ # docker version
Client:
Version: 20.10.16
API version: 1.41
Go version: go1.18.5
Git commit: aa7e414fdcb23a66e8fabbef0a560ef1769eace5
Built: Tue Aug 2 11
0817 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
~ # docker-compose version
The command 'docker-compose' could not be found in this WSL 2 distro.
We recommend to activate the WSL integration in Docker Desktop settings.
For details about using Docker Desktop with WSL 2, visit:
https://docs.docker.com/go/wsl2/
~ # kubectl version
I0830 19
2605.329229 7689 versioner.go:58] invalid configuration: no configuration has been provided
I0830 19
2605.333519 7689 versioner.go:64] No local kubectl binary found, fetching latest stable release version
I0830 19
2605.627855 7689 versioner.go:84] Right kubectl missing, downloading version 1.25.0
Downloading
https://storage.googleapis.com/kubernetes-release/release/v1.25.0/bin/linux/amd64/kubectl
kubectl1.25.0 100% |████████████████████████████████████████| (45/45 MB, 29.381 MB/s) [1s:0s] done.
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short. Use --output=yaml|json to get the full version.
Client Version:
version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.0", GitCommit:"a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2", GitTreeState:"clean", BuildDate:"2022-08-23T17
4459Z", GoVersion:"go1.19", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7
The connection to the server localhost:8080 was refused - did you specify the right host or port?
(NOTE: I didn't get the localhost error after kubectl was installed on Ubuntu; everything else was the same)
Do we need to copy, link, or manually install these apps? Please provide details.
Thanks,
John