https://rancher.com/ logo
b

bumpy-truck-18301

08/30/2022, 7:51 PM
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:24a448fffe038d74 prefixlen 64 scopeid 0x20<link> ether 26a448038d: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:2155dfffe57df78 prefixlen 64 scopeid 0x20<link> ether 00155d57df: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:8c2134fffe02bbf3 prefixlen 64 scopeid 0x20<link> ether 8e213402bb: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:f0c75fffec48363 prefixlen 64 scopeid 0x20<link> ether f2c705c483: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:c8fbfffec06e9 prefixlen 64 scopeid 0x20<link> ether 0e8f0bc006: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:242bcffffe97e683 prefixlen 64 scopeid 0x20<link> ether 262bcf97e6: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:14891afffe2d9364 prefixlen 64 scopeid 0x20<link> ether 16891a2d93: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:e4c14cfffe22b51b prefixlen 64 scopeid 0x20<link> ether e6c14c22b5: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 110817 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 192605.329229 7689 versioner.go:58] invalid configuration: no configuration has been provided I0830 192605.333519 7689 versioner.go:64] No local kubectl binary found, fetching latest stable release version I0830 192605.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-23T174459Z", 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
h

handsome-jewelry-53515

08/31/2022, 3:22 AM
Are you running the rancher-desktop app during your testing? The links required are setup as the app initializes. If you are running the app, are you seeing any errors on the app?
b

bumpy-truck-18301

08/31/2022, 6:12 PM
Yes, after install the rancher GUI shows that the Helm charts are complete and all services are active. When rancher is down then the rancher-desktop distro in WSL2 is inactive, so I would not have been able to repeat the tests there. Notice that nerdctl and Docker are both available in the rancher distro, but not in Ubuntu. Also, it doesn't appear that systemd is available in either distro, which is likely, the cause of the issue. I'm hoping for a solution from someone who knows how to solve the issue properly, instead of cobbing a solution myself.
w

wide-mechanic-33041

08/31/2022, 7:24 PM
well systemd isn’t supported in WSL2 so if you need pid1 that will be a blocker. What is the Ubuntu distro role in your design? Sorry the wall of text makes it hard to follow. RD uses Alpine for the container host and you can call docker or nerdctl from Windows
b

bumpy-truck-18301

08/31/2022, 9:31 PM
sorry, brainfart - containerd not systemd.
w

wide-mechanic-33041

09/01/2022, 12:04 PM
it looks like you are doing a lot of calls from the Ubuntu dist. So assume you checked off the integration in that dist so it handles the networking between the two dists? I might suggest just doing some incremental tests from your CMD prompt to make sure the basics are working as well.
b

bumpy-truck-18301

09/01/2022, 11:40 PM
assume you checked off the integration in that dist so it handles the networking between the two dists?
I tried to determine the network status by pinging the IP's listed by ifconfig. Are there other steps you suggest?
I might suggest just doing some incremental tests from your CMD prompt to make sure the basics are working as well.
The basics of WSL? RD? What types of tests do you recommend? I'm new to WSL and K8s, so I'm still getting a handle on the details of the components, plumbing, etc. My intuition is that RD didn't install/link all of the components that were intended in either dist. I can install/link them manually, but I'm hoping that someone can provide the coorect configuration (e.g. "containerd is installed in dist x:path y, with a simlinks in dist x:path z, dist a:path b"). Then I can correct the configuration without breaking the intended integration.
162 Views