How to install Rancher when has DNS problem?

Install Rancher on a cloud such as AWS, may happens DNS problem. Even with Rancher server and Rancher nodes.
The solution is set a docker daemon and restart docker:

https://docs.docker.com/engine/installation/linux/linux-postinstall/#dns-resolver-found-in-resolvconf-and-containers-cant-use-it

How to check DNS on CentOS

$ cat /var/log/messages | grep dnsmasq
$ ps -ef | grep dnsmasq

Find IP and set to docker daemon

$ sudo vim /etc/docker/daemon.json
{
“dns”: [“10.130.128.2”]
}
$ sudo systemctl restart docker

Advertisements