This message was deleted.
# rancher-desktop
a
This message was deleted.
c
and after that I directly configured the proxies via wsl terminal and the tried:
Copy code
docker pull <http://abcd.com:5000/your-image-name>
but there was a error that:
/usr/local/bin/docker-credential-rancher-desktop: source: line 5: can't open '/etc/rancher/desktop/credfwd': No such file or directory
(edited)
w
so a couple things • do you have a vpn at play that could be causing issues with wsl networking? can you curl your registry in a
rdctl shell
terminal? • Did you set a no_proxy as I am guessing traffic is trying to hairpin through the proxy? • Try and make sure registry connectivity is working before doing your pull. that also looks like a
docker login
issue but not sure
c
On executing the command
docker login <http://abcd.com:5000>
, I'm getting the same error:
Copy code
/usr/local/bin/docker-credential-rancher-desktop: source: line 5: can't open '/etc/rancher/desktop/credfwd': No such file or directory
w
yes don't try the login or pull till you have figured out your networking issue
c
I'm able to ping to the server on which the registry is there
I added the proxy to
/etc/conf.d/docker
Copy code
NO_PROXY="........."
HTTPS_PROXY="http://......."
HTTP_PROXY="http://........"
 
export HTTP_PROXY
export HTTPS_PROXY
export NO_PROXY
then I added the insecure-registries in
/etc/docker/daemon.json
also becuase I'm connected to a vpn I updated the %USERPROFILE%/.kube/config and changed the server ip to
Copy code
server: <https://localhost:6443>
and after all this when I am restarting my docker service, the insecure-registries are still not getting registered
w
so when you curl from
rdcrtl shell
what is coming up. k8s registry configs are different than docker so what are you trying to setup?
c
I can't use docker desktop and I was shifting to rancher desktop, so I wanted to register my local registries, but I was confused in how to do this as I was not much aware about how to change configurations of rancher from the
rdcrtl shell
, The issue was with the vpn I was using becuase of which I was getting errors like
server responded with http content on https request
to resolve the issue : • start rancher desktop without vpn connection •
rdctl shell
sudo vi /etc/docker/daemon.json
◦ { ◦ "insecure-registries": [ ◦ "localhost:5000", ◦ unsecure registries ◦ ], ◦ "features": { ◦ "containerd-snapshotter": false ◦ } ◦ } • restart Rancher •
rdctl shell
• export these variables ◦
NO_PROXY="localhost,127.0.0.1,<http://xx.xxx.xx.com|xx.xxx.xx.com>"
HTTPS_PROXY="<http://abcd:80>"
HTTP_PROXY="<http://abcd:80>"
export HTTP_PROXY
export HTTPS_PROXY
export NO_PROXY
• Modify Kube config located at
<C://User/> %USERPROFILE% /.kube/config
(r*eplacing cluster server IP* https://xx.xx.xx.xx:6443/ with localhost eg:https://localhost:6443 ) • download vpnkit (https://github.com/sakai135/wsl-vpnkit/releases/download/v0.3.7/wsl-vpnkit.tar.gz) •
wsl —import wsl-vpnkit —version 2 $env:USERPROFILE\wsl-vpnkit  ~<c://downloaded> path~/wsl-vpnkit.tar.gz
• start
wsl -d wsl-vpnkit service wsl-vpnkit start
Now connect with VPN • docker login abcd.com:5000
#u: username
#p: password
this will register your insecure registry to the rancher docker and will also work when you're connected to vpn
w
if your VPN is stepping on WSL by breaking the route table you may want to look at the tunnel support in RD prefs. It uses gvisor for the flows instead of the HyperV vSwitch. Since layer3 is not in the mix you have fewer of these type of vpn issues