https://rancher.com/ logo
Title
h

handsome-salesclerk-54324

03/11/2023, 12:59 PM
I'm running k3d v5.4.8 on WSL-2 1.1.3.0 which was working previously but when I set
export KUBECONFIG=/home/mwoodpatrick/.k3d/kubeconfig-local-k8s.yaml
and run
kubectl version
I get
Client Version: <http://version.Info|version.Info>{Major:"1", Minor:"20", GitVersion:"v1.20.15", GitCommit:"8f1e5bf0b9729a899b8df86249b56e2c74aebc55", GitTreeState:"clean", BuildDate:"2022-01-20T02:28:14Z", GoVersion:"go1.15.15", Compiler:"gc", Platform:"linux/amd64"}
Unable to connect to the server: context deadline exceeded
docker ps shows that the server and load balancer are running and I can use docker to exec into the server If I run
k3s kubectl version
I get:
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: <http://version.Info|version.Info>{Major:"1", Minor:"25", GitVersion:"v1.25.6+k3s1", GitCommit:"9176e03c5788e467420376d10a1da2b6de6ff31f", GitTreeState:"clean", BuildDate:"2023-01-26T00:47:47Z", GoVersion:"go1.19.5", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7
error: Get "<https://0.0.0.0:34117/version?timeout=32s>": context deadline exceeded - error from a previous attempt: EOF
Any suggestions on the best way to debug what the issue is?
w

wide-garage-9465

03/11/2023, 1:11 PM
Do you have any logs from the server container?
h

handsome-salesclerk-54324

03/11/2023, 1:14 PM
How do I get these?
w

wide-garage-9465

03/11/2023, 1:15 PM
docker logs k3d-<cluster name>-server-0
h

handsome-salesclerk-54324

03/11/2023, 1:17 PM
Thanks its showing E0311 13:16:22.351577 8 pod_workers.go:965] "Error syncing pod, skipping" err="failed to \"CreatePodSandbox\" for \"helm-install-traefik-crd-ncwc2_kube-system(ae36e368-d021-4e11-b9fd-57e7fdb788aa)\" with CreatePodSandboxError: \"Failed to create sandbox for pod \\\"helm-install-traefik-crd-ncwc2_kube-system(ae36e368-d021-4e11-b9fd-57e7fdb788aa)\\\": rpc error: code = Unknown desc = failed to get sandbox image \\\"rancher/mirrored-pause:3.6\\\": failed to pull image \\\"rancher/mirrored-pause:3.6\\\": failed to pull and unpack image \\\"docker.io/rancher/mirrored-pause:3.6\\\": failed to resolve reference \\\"docker.io/rancher/mirrored-pause:3.6\\\": failed to do request: Head \\\"https://registry-1.docker.io/v2/rancher/mirrored-pause/manifests/3.6\\\": dial tcp: lookup registry-1.docker.io on 127.0.0.11:53: read udp 127.0.0.1:38427-&gt;127.0.0.11:53: i/o timeout\"" pod="kube-system/helm-install-traefik-crd-ncwc2" podUID=ae36e368-d021-4e11-b9fd-57e7fdb788aa
w

wide-garage-9465

03/11/2023, 1:32 PM
Some networking/DNS issue? Are you in a different network or enabled VON maybe?
h

handsome-salesclerk-54324

03/11/2023, 2:12 PM
I am able to fetch and run images from docker e.g.
docker run -d -p 8081:80 docker/getting-started
works However this fails
wget https://registry-1.docker.io/v2/rancher/mirrored-pause/manifests/3.6
--2023-03-11 06:09:21-- https://registry-1.docker.io/v2/rancher/mirrored-pause/manifests/3.6
Resolving registry-1.docker.io (registry-1.docker.io)... 34.205.13.154, 44.205.64.79, 3.216.34.172
Connecting to registry-1.docker.io (registry-1.docker.io)|34.205.13.154|:443... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Username/Password Authentication Failed.
This also works:
k3d cluster create local-k8s
INFO[0000] Prep: Network
INFO[0000] Re-using existing network 'k3d-local-k8s' (f300436aff034ab53bb5e632dcdb4c4dae62549ea1f0c94efa493032cef91161)
INFO[0000] Created image volume k3d-local-k8s-images
INFO[0000] Starting new tools node...
INFO[0000] Pulling image '<http://ghcr.io/k3d-io/k3d-tools:5.4.8|ghcr.io/k3d-io/k3d-tools:5.4.8>'
INFO[0001] Creating node 'k3d-local-k8s-server-0'
INFO[0002] Pulling image '<http://docker.io/rancher/k3s:v1.25.6-k3s1|docker.io/rancher/k3s:v1.25.6-k3s1>'
INFO[0002] Starting Node 'k3d-local-k8s-tools'
INFO[0009] Creating LoadBalancer 'k3d-local-k8s-serverlb'
INFO[0010] Pulling image '<http://ghcr.io/k3d-io/k3d-proxy:5.4.8|ghcr.io/k3d-io/k3d-proxy:5.4.8>'
INFO[0013] Using the k3d-tools node to gather environment information
INFO[0014] HostIP: using network gateway 172.22.0.1 address
INFO[0014] Starting cluster 'local-k8s'
INFO[0014] Starting servers...
INFO[0014] Starting Node 'k3d-local-k8s-server-0'
INFO[0018] All agents already running.
INFO[0018] Starting helpers...
INFO[0018] Starting Node 'k3d-local-k8s-serverlb'
INFO[0025] Injecting records for hostAliases (incl. host.k3d.internal) and for 2 network members into CoreDNS configmap...
INFO[0027] Cluster 'local-k8s' created successfully!
INFO[0027] You can now use it like this:
kubectl cluster-info
w

wide-garage-9465

03/21/2023, 8:16 AM
Hey 👋 Is this actually still an issue?