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

WSL2 -> Ubuntu -> K3S cannot pull images after changing network #8162

Closed
Chris2301 opened this issue Aug 9, 2023 · 5 comments
Closed

WSL2 -> Ubuntu -> K3S cannot pull images after changing network #8162

Chris2301 opened this issue Aug 9, 2023 · 5 comments

Comments

@Chris2301
Copy link

Chris2301 commented Aug 9, 2023

Hi,

I am using K3s to startup company pod via a VPN and since I have been to the office, where it also worked, pod wont start anymore because they cannot pull the images.

Failed to pull image "location/name:version": rpc error: code = Unknown desc = failed to pull and unpack image "location/name:version": failed to resolve reference "location/name:version": failed to do request: Head "location/name:version": dial tcp: lookup location: no such host

I started a dummy pod and curl to the url and this works....

Environment is as the title describes;
Windows with a VPN running, WSL2 with K3s and docker installed (no docker desktop)

What I have tried so far;

  • Restarting K3s
  • kubectl apply -f https://k8s.io/examples/admin/dns/dnsutils.yaml and debugged seeing no changes
  • restart pod coredns
  • ip route showing no duplicate routes
  • docker pull image works
  • Curl from inside a dummy container to the specific image works also

Kubectl versions
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.13", GitCommit:"592eca05be27f7d927d0b25cbb4241d75a9574bf", GitTreeState:"clean", BuildDate:"2022-10-12T10:57:16Z", GoVersion:"go1.17.13", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.4+k3s1", GitCommit:"36645e7311e9bdbbf2adb79ecd8bd68556bc86f6", GitTreeState:"clean", BuildDate:"2023-07-28T09:46:04Z", GoVersion:"go1.20.6", Compiler:"gc", Platform:"linux/amd64"}

resolv.conf with interesting WSL text

# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 173.24.145.1

More attempts that failed:

@cwayne18
Copy link
Member

cwayne18 commented Aug 9, 2023

WSL or WSL2?

@Chris2301 Chris2301 changed the title WSL -> Ubuntu -> K3S cannot pull images after changing network WSL2 -> Ubuntu -> K3S cannot pull images after changing network Aug 9, 2023
@Chris2301
Copy link
Author

Chris2301 commented Aug 9, 2023

WSL or WSL2?

Updated (WSL2)

@cwayne18
Copy link
Member

cwayne18 commented Aug 9, 2023

Thanks, we can take a look but FWIW we don't test/support wsl at the moment so there's not a ton of expertise on the team. That said we'll certainly see what we can do!

@Chris2301
Copy link
Author

Cheers @cwayne18 , I also keep updating my attempts in the topic start

@Chris2301
Copy link
Author

Solved it by adding the ip + hostname to /etc/hosts on my ubuntu system. Probably a workaround, but it works. Still no clue why this can go wrong after switching networks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants