Closed TLmaK0 closed 2 years ago
it seems like you are resolving to a 301 - to instruct curl to follow redirects you need to provide the -L option
@xquery I think you didn't understand correctly the problem. If you look at the first request you will see a curl: (6) Could not resolve host: domain.com
which is not correct, but if you do the same with other curl version it works as expected.
I think I understand your problem - was reading things wrong way around ;)
doing
docker run curlimages/curl:7.77.0 -v -- domain.com
vs
docker run curlimages/curl:7.81.0 -v -- domain.com
seeing same output, trying to repro in Kubernetes
Thanks @xquery ;)
It could be realated to https://stackoverflow.com/questions/65181012/does-alpine-have-known-dns-issue-within-kubernetes
It seems this was closed before the problem was identified. Are there any suggestions for what someone who wants to use these images should do when running on a Kubernetes cluster and getting these DNS "Could not resolve" errors?
@djhoese the only way I found is to downgrade to curl 7.77
After version 7.77 curl is not able to resolve hosts:
kubectl run --restart Never --image curlimages/curl:7.80.0 curl -- domain.com
kubectl logs curl
kubectl delete pod curl
kubectl run --restart Never --image curlimages/curl:7.77.0 curl -- domain.com
kubectl logs curl
I think this is due to problems with Alpine and Kubernetes dns reported, like this: https://www.openwall.com/lists/musl/2018/03/30/7