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

Re: Pod unable to connect with service IP



Service IPs are virtual and can't be pinged.

When you create a service with a single port, a few iptables rules get added to each cluster node. When processes running inside pods on those nodes try to connect to the service IP and port, the network packet's destination address is changed to the IP of one of the pods (the destination port is also changed to the service's target port).

That's why ping can't help you debug services. Try connecting to one of the pod's directly (instead going through the service). If you're able to connect to all the pods, connecting through the service IP should work, too. If not, double check you're connecting to the correct service port.


On 03. 03. 2017 22:06, Vignesh M.P.N. wrote:
Hello

I have a pod, service and route deployed in openshift. I am unable to resolve my service name from the pod. When I try to ping my service name, the DNS resolves it to the right IP address but unable to route it. I get the following output:

PING cd-cluster.ns1.svc.cluster.local (172.30.156.57) 56(84) bytes of data
From 171.71.241.194: icmp_seq=1 Destination Host Unreachable

How can I troubleshoot this issue? Please let me know if I need to provide more info.

Here are my versions:
openshift v1.3.0
kubernetes v1.3.0+52492b4
etcd 2.3.0+git

# docker version
Client:
 Version:         1.10.3
 API version:     1.22
 Package version: docker-common-1.10.3-46.el7.centos.14.x86_64
 Go version:      go1.6.3
 Git commit:      cb079f6-unsupported
 Built:           Fri Sep 16 13:24:25 2016
 OS/Arch:         linux/amd64

Server:
 Version:         1.10.3
 API version:     1.22
 Package version: docker-common-1.10.3-46.el7.centos.14.x86_64
 Go version:      go1.6.3
 Git commit:      cb079f6-unsupported
 Built:           Fri Sep 16 13:24:25 2016
 OS/Arch:         linux/amd64

Here is my /etc/resolv.conf from pod
search ns1.svc.cluster.local svc.cluster.local cluster.local
nameserver 10.2.2.2
options ndots:5

Thanks
Vignesh



_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


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