[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Pod unable to connect with service IP

Thanks for the response. That explains why the service IP was not pingable.

I would like to step up and ask the original problem I am facing here. I am trying to setup a couchbase cluster on openshift, I have deployed a pod, service (name: couchbase-master-service) and route in openshift environment following the example provided here https://github.com/arun-gupta/couchbase-kubernetes/tree/master/cluster

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

couchbase-cli server-add --cluster=couchbase-master-service:8091

Here is the script being invoked by Dockerfile (https://github.com/arun-gupta/couchbase-kubernetes/blob/master/cluster/configure-node.sh)

But during the pod creation I get this error:
Unable to connect to host at http://couchbase-master-service:8091

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?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]