Under certain circumstances, trying to curl URLs with multiple redirects from inside a Linux container returns errors such as, 'Unknown error.' If DNS resolution is attempted to the same address, errors such as 'UnknownHostException' and 'Name or service not known' may be thrown by the DNS client. This can occur even though successful connection or DNS resolution may be possible from one of the cluster nodes and from outside of the OpenShift cluster.
For example, trying to curl to "api.partners.example.com" may result in an error like:
$ oc rsh <pod_name> -n <project_name> sh-4.2$ curl api.partners.example.com curl: (6) Could not resolve host: api.partners.example.com; Unknown error
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.