Issue #11152 has been reported by David Aronchick.

----------------------------------------
Bug #11152: Resolv::DNS should use Search Domains provided in /etc/resolv.conf by default
https://bugs.ruby-lang.org/issues/11152

* Author: David Aronchick
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: 
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
For some reason Resolv::DNS does not use search domains. Many downstream projects rely on Resolv, and this appears broken. I'm showing this below in Kubernetes, but it's based on the search domain(s), rather than a cluster issue.

~~~
[1] pry(main)> require 'resolv'
=> true
[2] pry(main)> Resolv::DNS.new.getaddresses('client')
=> []
[3] pry(main)> nameservers = ["10.0.0.10", "169.254.169.254", "10.240.0.1"]
[4] pry(main)> search_domains = ["default.kubernetes.local", "kubernetes.local", "c.bar-foobar-91020.internal.", "55618245300.google.internal.", "google.internal."]
[5] pry(main)> a = Resolv::DNS.new(:nameserver => nameservers, :search => search_domains)
[...output...]
[6] pry(main)> a.getaddresses('client')
=> [#<Resolv::IPv4 10.0.118.178>]
~~~





-- 
https://bugs.ruby-lang.org/