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

Re: Question about Openshift origin DNS



10.1.241.55 should be the IP address of the node and dnsmasq should be running on the node which will route queries for 'cluster.local' to the appropriate place. Can you check on dnsmasq on the node?

On Mon, Aug 21, 2017 at 6:38 AM, Yu Wei <yu2003w hotmail com> wrote:

Hi,

I setup Openshift Origin 1.5 with openvswitch network plugin.

It seemed that dns server setup was not properly within pod.

services, endpoints couldn't be reached by name.

Within pod, /etc/resolv.conf contains following content,

root sb-2017-redis-master-w7g44:/data# cat /etc/resolv.conf
search redis.svc.cluster.local svc.cluster.local cluster.local
nameserver 10.1.241.55
options ndots:5


Then I added "172.30.0.1" to /etc/resolv.conf as below,

root sb-2017-redis-master-w7g44:/data# cat /etc/resolv.conf
search redis.svc.cluster.local svc.cluster.local cluster.local
nameserver 10.1.241.55
options ndots:5
nameserver 172.30.0.1

Then services, endpoints could be found by dns name.

So why is "nameserver 172.30.0.1" not added to /etc/resolv.conf automatically?

Did I missed anything when setup cluster?



[root host-10-1-236-92 gluster]# dig redis-svc.redis.svc.cluster.local

; <<>> DiG 9.9.4-RedHat-9.9.4-29.el7 <<>> redis-svc.redis.svc.cluster.local
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4207
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;redis-svc.redis.svc.cluster.local. IN    A

;; ANSWER SECTION:
redis-svc.redis.svc.cluster.local. 30 IN A    172.30.4.92

;; Query time: 2 msec
;; SERVER: 172.30.0.1#53(172.30.0.1)
;; WHEN: Mon Aug 21 18:48:50 CST 2017
;; MSG SIZE  rcvd: 67

[root host-10-1-236-92 gluster]# dig redis-svc.redis.endpoints.cluster.local

; <<>> DiG 9.9.4-RedHat-9.9.4-29.el7 <<>> redis-svc.redis.endpoints.cluster.local
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19434
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;redis-svc.redis.endpoints.cluster.local. IN A

;; ANSWER SECTION:
redis-svc.redis.endpoints.cluster.local. 30 IN A 10.130.0.2

;; Query time: 5 msec
;; SERVER: 172.30.0.1#53(172.30.0.1)
;; WHEN: Mon Aug 21 18:49:05 CST 2017
;; MSG SIZE  rcvd: 73







Thanks,

Jared, (韦煜)
Software developer
Interested in open source software, big data, Linux


_______________________________________________
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]