Unable to Resolve Service Name in OpenShift
Issue
- Cannot resolve service name from inside other pods
sh-4.2$ curl -v postgresql-sonarqube.svc.cluster.local
* Could not resolve host: postgresql-sonarqube.svc.cluster.local; Name or service not known
* Closing connection 0
curl: (6) Could not resolve host: postgresql-sonarqube.svc.cluster.local; Name or service not known
sh-4.2$ curl -v postgresql-sonarqube.cicdtw.svc.cluster.local
* Could not resolve host: postgresql-sonarqube.cicdtw.svc.cluster.local; Name or service not known
* Closing connection 0
curl: (6) Could not resolve host: postgresql-sonarqube.cicdtw.svc.cluster.local; Name or service not known
Environment
- Red Hat OpenShift Enterprise
- 3.1
- 3.2
- Red Hat OpenShift Container Platform
- 3.3
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.