I am not quite sure if this a problem with the configuration how we deploy a new cluster or we just not finish the configuration after the cluster is deployed. But at the moment the hostname inside the pods are not resolving while the using of IPs works fine, both (cluster and pods) get routable IPs in our company network that's why I am a little bit confused why the request not reach the pods. Did I need so setup something like kubedns? So the request first ask the kubedns (in the cluster) and this one gives the request to our company dns-server?
best regards
Dan
nslookup mysql
Server: 10.233.0.3
Address 1: 10.233.0.3 kube-dns.kube-system.svc.example.com
Name: mysql
Address 1: 10.233.52.31 mysql.default.svc.example.com
but if I do for an server in our compaony network. I get this
# nslookup ldap
Server: 10.233.0.3
Address 1: 10.233.0.3 kube-dns.kube-system.svc.example.com
nslookup: can't resolve 'ldap'
I already at our upstream-Nameservers by:
apiVersion: v1
kind: ConfigMap
metadata:
name: kube-dns
namespace: kube-system
data:
upstreamNameservers: |
["8.8.8.8"]
but this doesn't change the result :-(
The question I am facing now is why gives kube-dns the request for servernamens he doesn't know not to the upstream-nameserver?
ok now I take a longer look around and it seems kubespray (the way we deploy our new cluster) already brings kube-dns to the cluster. In a pod I do for another pod:
nslookup mysql
Server: 10.233.0.3
Address 1: 10.233.0.3 kube-dns.kube-system.svc.example.com
Name: mysql
Address 1: 10.233.52.31 mysql.default.svc.example.com
but if I do for an server in our compaony network. I get this
# nslookup ldap
Server: 10.233.0.3
Address 1: 10.233.0.3 kube-dns.kube-system.svc.example.com
nslookup: can't resolve 'ldap'
I already at our upstream-Nameservers by:
apiVersion: v1
kind: ConfigMap
metadata:
name: kube-dns
namespace: kube-system
data:
upstreamNameservers: |
["8.8.8.8"]
Maybe my post is at this point uncomplete I just post the result of the nslookup for ldap because the domain example.com exists in the search-tag of the /etc/resolv.conf on the node and in the pod too. But to complete this point the nslookup don't work with just the hostname nor the FQDN.
The strange thing I am facing at the moment is that a nslookup for webserver.foobar.example.com works that's why it look for me at the moment that the pods ask the kube-dns: "do you know ldap.example.com?" (the example.com is the domain in which the cluster lives too) and if kube-dns didn't know this host the nameserver don't give the request to the upstream nameserver and says: "can't resolve". But when a server has a request for a subdomain which isn't known by the DNS the nameserver of kubernetes gives this request to the upstream-nameserver.
If this is really the problem, how can I configure kube-dns that he ask the upstream nameserver if he doesn't know the host.
The explanation for your second hint is, that I don't want to post here the (private) IPs of our company network that's why I choose this one (and copied it from a HowTo) but maybe I should for this problem/example the IP 192.168.1.5 as the nameserver of your company
First of all I would like to thank you for your response and the hint that I don't try to resolve the name by the pod rather for the service.
Maybe my post is at this point uncomplete I just post the result of the nslookup for ldap because the domain example.com exists in the search-tag of the /etc/resolv.conf on the node and in the pod too. But to complete this point the nslookup don't work with just the hostname nor the FQDN.
The strange thing I am facing at the moment is that a nslookup for webserver.foobar.example.com works that's why it look for me at the moment that the pods ask the kube-dns: "do you know ldap.example.com?" (the example.com is the domain in which the cluster lives too) and if kube-dns didn't know this host the nameserver don't give the request to the upstream nameserver and says: "can't resolve". But when a server has a request for a subdomain which isn't known by the DNS the nameserver of kubernetes gives this request to the upstream-nameserver.
If this is really the problem, how can I configure kube-dns that he ask the upstream nameserver if he doesn't know the host.
The explanation for your second hint is, that I don't want to post here the (private) IPs of our company network that's why I choose this one (and copied it from a HowTo) but maybe I should for this problem/example the IP 192.168.1.5 as the nameserver of your company
--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-use...@googlegroups.com.
To post to this group, send email to kubernet...@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.