kind: Cannot access registry.docker.io from worker nodes on WSL2 Debian 11
What happened: registry.docker.io and registry-1.docker.io are not reachable from worker nodes. Due to this deployments does not work. e.g. helm install airflow fails with below error
“Failed to pull image “redis:6-buster”: rpc error: code = Unknown desc = failed to pull and unpack image “docker.io/library/redis:6-buster”: failed to resolve reference “docker.io/library/redis:6-buster”: failed to do request: Head “https://registry-1.docker.io/v2/library/redis/manifests/6-buster”: dial tcp: lookup registry-1.docker.io on 172.19.0.1:53: no such host”
Please let me know, if you need any further information. I must say, this is a new environment for me and I found this issue while trying to learn how to setup airflow on Kubernetes using Kind.
What you expected to happen: Would expect that docker registry is reachable from worker node and deployments works.
How to reproduce it (as minimally and precisely as possible): kind create cluster --image kindest/node:v1.20.7 helm repo add apache-airflow https://airflow.apache.org helm repo update kubectl create namespace test helm install test-airflow apache-airflow/airflow --namespace test
Anything else we need to know?:
Node has access to internet and reach google, yahoo and other sites. problem seems to be very specific trying to resolve registry.docker.io and registry-1.docker.io
ping registry.docker.io ping: registry.docker.io: Temporary failure in name resolution
ping registry-1.docker.io PING registry-1.docker.io (34.200.175.181) 56(84) bytes of data.
traceroute registry.docker.io registry.docker.io: Name or service not known Cannot handle "host" cmdline arg registry.docker.io on position 1 (argc 1)
traceroute registry-1.docker.io registry-1.docker.io: No address associated with hostname Cannot handle "host" cmdline arg
registry-1.docker.io’ on position 1 (argc 1)`
I have document various network information on the github repo. I have kept it logged in case it is needed and helpful, even though I do not understand all of it.
Environment:
- kind version: (use
kind version
): kind v0.11.1 go1.16.4 linux/amd64 - Kubernetes version: (use
kubectl version
): client 1.23, server 1.20 - Docker version: (use
docker info
): Server Version: 20.10.12. running inside WSL and not as Docker desktop on Windows. - OS (e.g. from
/etc/os-release
): “Debian GNU/Linux 11 (bullseye)” running on WSL2 on WIndows 11
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (6 by maintainers)
it would have been different, if it worked after a restart. I tried all layers of restart
Anyways, I like this perspective more 😁
Time to 🧘 …
Update: After more than 2 weeks of trying to find out what was causing this strange error and reading many threads and trying few things, it suddenly works!!!
I have no idea what solved it, but at the moment I cannot reproduce this issue.
I will keep this thread open for some time. Will close it, if issue does not come up again in a week or so.
I find that i have found the correct workaround for this bug: Switching IPTables to legacy mode has fixed this for me.
https://github.com/docker/for-linux/issues/1406#issuecomment-1183487816
Marking this issue as closed as for now kind cluster and further software installations can connect with docker now. Thanks for all who spent some time to share their inputs and perspectives.