rancher / os

Tiny Linux distro that runs the entire OS as Docker containers
https://rancher.com/docs/os/v1.x/en/
Apache License 2.0
6.44k stars 655 forks source link

RancherOS Does not respect DHCP option 119 (domain-search) #2978

Open AntonSmolkov opened 4 years ago

AntonSmolkov commented 4 years ago

RancherOS Version: (ros os version) 1.5.5 Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.) VM and docker-machine

"search" parameter just doesn't appear in /etc/resolv.conf file.

Because of this, deployed K8s pods don't have nods's domain in a list of search domains, and, therefore can't resolve short names from outside of the cluster.

AntonSmolkov commented 4 years ago

BTW, cloud-config described here overrides the whole resolv.conf file and leaves only "search" parameter.

So, AFAIK, the only valid workaround by this time:

write_files: 
  - container: network
    content: "search yourdomain.local\n"
    owner: root
    path: /etc/resolv.conf.head
    permissions: "0444"