kubernetes cannot resolve domain properly

10/24/2017

After I upgraded Kubernetes to v1.7, the the domains in Nginx config and other MySQL connection fails.

this log is from Nginx:

nginx: [emerg] host not found in upstream "subdomain.domain.com"

this log is from a python app:

OperationalError: (_mysql_exceptions.OperationalError) (2005, "Unknown MySQL server host 'rm-xxxxxxxxxx.mysql.rds.provider.com' (110)")

And another connection with pymongo timed out.

All I mentioned above worked fine when I was using v1.6 or without kubernetes. I wonder if there were any differences between kubernetes v1.6 and v1.7 could result in this problem? kube-proxy should be blamed for this in my opionion, but I cannot figure it out.

-- klew
kubernetes

1 Answer

11/9/2017

I have not enough reputation to add comment , can you check your kube-dns is running well? and you can enter in the pod to set the resolv.conf of the nameserver 8.8.8.8, try it check use other dns can work

-- sam
Source: StackOverflow