We help IT Professionals succeed at work.

dns issue in newly created kubernetes cluster

Member_2_5993818
Member_2_5993818 used Ask the Experts™
on
I created a cluster with 2 vm's. I followed instructions listed below.This is on RHEL 7.3 This is after kubernetes was installed using yum. The version of kubernetes is 1.7

commands on Master01-only

sysctl net.bridge.bridge-nf-call-iptables=1
sysctl net.bridge.bridge-nf-call-ip6tables=1
systemctl stop firewall
systemctl disable firewall
systemctl status firewall
systemctl start iptables.service
systemctl enable iptables.service
iptables -F
service kubelet restart
kubeadm init --pod-network-cidr 10.244.0.0/16
make sure you copy the kubeadm join command that gets displayes after cluster creation"

mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
kubectl get nodes
kubectl describe nodes
cd ~/Downloads
kubectl apply -f flannel.yml
kubectl apply -f flannel-rbac.yml
kubectl create -f rolebinding.yml
kubectl create -f role.yml
commands on node-only

sysctl net.bridge.bridge-nf-call-iptables=1
sysctl net.bridge.bridge-nf-call-ip6tables=1
systemctl stop firewall
systemctl disable firewall
systemctl status firewall
systemctl start iptables.service
systemctl enable iptables.service
iptables -F
kubeadm join --token xxxxxx.xxxxxxxxxxxxxx x.x.x.x:6443
The issue i am having is that the dns is not working as expected. Have been struggling with this for past two days. Would appreciate any help.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
David FavorFractional CTO
Distinguished Expert 2018

Commented:
To debug DNS, best to use dig commands + debug DNS independent of all else.

This will narrow the problem to your container/cluster system or DNS setup.

Best start at the bottom (DNS) + work up (toward kubernetes).

Also, when you say DNS fails, give the exact command(s) you're using + their full output, which shows failure.

Author

Commented:
Basically i have tried the busybox deploy for dns test. I have also tried the test container to test dns resolution inside the container.
Also the dashboard app is going in crashlopbackoff with apiserver non reachable errors.