Re: Pod unable to connect with service IP

From: "Vignesh M.P.N." <vigneshb4u gmail com>

To: users redhat com

Subject: Re: Pod unable to connect with service IP

Date: Wed, 8 Mar 2017 09:41:20 -0500

Hello Clayton & Marko

I am stuck at this point. I am unable to move ahead without being able to access the Service Name/Service IP from the pod. The DNS seems to be working fine. Is there anything else I can try to troubleshoot this issue?

couchbase-cluster-rc-6ulm8 is the first pod (172.17.0.20) and is defined as part of service couchbase-cluster. couchbase-index-rc-wj46z is the second pod (172.17.0.19) and not part of the service. To add the second pod the couchbase-cluster, I am trying to access Service IP of couchbase-cluster from second pod.

I create another pod, which is not part of the service and in the Dockerfile of the pod, I have a command that refers to the service using Service Name. To be specific, I am trying to add the second pod to the couchbase cluster instance of the first pod. I won't be aware of the first Pod IP address or the Service IP address. Hence referring by the service name, hoping to resolve it to the right IP address. The command goes like this

Initially I thought the Service Name "couchbase-master-service" was not resolving correctly to the service IP by openshift's built-in DNS cluster add-on. So I tried to troubleshoot using ping. But I did notice the pod was able to resolve the Service IP address but it was unable to reach the host. As you explained, that was not the right way to troubleshoot this issue.

Is there any alternative approach on how I could refer to an existing service without using it Service IP?