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

Question about Openshift origin DNS



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


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