3

I am unable to reach any server in my network, either ping or ssh. I can do that from my host server but not from the kubernetes pod containers. I have verified both /etc/resolv.conf and /etc/nsswitch.conf on my host machine, they are all correct.

/etc/resolv.conf in my pod containers has a different nameserver, it's a private local ip, nameserver 10.96.0.10 i thinks that's related to kubernetes and there is no /etc/nsswitch.conf in my kubernetes container. Kubernetes pods should inherit these settings from the host machine, but in my case it doesn't work.

If i run a docker container manually, i.e with docker run, it all again works fine. So the problem is with kubernetes and the pod/containers it creates.

Kubernetes v1.7.3

PMat
  • 2,039
  • 2
  • 29
  • 46
  • I'm guessing from the IP that you are running a software defined network; which one? – mdaniel Aug 06 '17 at 03:36
  • _Kubernetes pods should inherit these settings from the host machine_ that is amazingly false, otherwise you could not run two Pods on the same Node who each believe they own port 80 (for example). If that is the kind of behavior you're after, setting `hostNetworking: true` in the Pod will do that – mdaniel Aug 06 '17 at 03:41
  • k8s doesn't use Docker's network overlay. Can you share details on how you setup your cluster and also what's the overlay network you used (eg. weave, calico, flannel)? – Eugene Chow Aug 06 '17 at 04:15
  • @EugeneChow I used flannel. It was working earlier, after upgrading to 1.7.3-01, it stopped working – PMat Aug 06 '17 at 04:29
  • @MatthewLDaniel I dont want to do hostNetworking: true, I can't do that. I just need to access my network machine from kubernetes pods – PMat Aug 06 '17 at 04:30
  • @PMat, try and do upgrade again and sometimes restarting all the services also help. I saw a post related to `1.7.3-X` i guess recently which reported an issue which was fixed after upgrading all the components to the next version. – Tarun Lalwani Aug 06 '17 at 06:30
  • @PMat are you able to ping other nodes using IP address? – sfgroups Aug 06 '17 at 15:11
  • no nothing else, except the host where pod is running – PMat Aug 06 '17 at 15:55
  • 1
    I have updated my services, looks like no update came in after the one i had. I believe now it's all working, but have to double check. Not sure what was different. Earlier i had restarted the host machine couple of times, it did not help. This is scarey if it's suddenly starts working – PMat Aug 06 '17 at 15:59

0 Answers0