<p>I have one master Node and one worker Node</p>

<p>On worker Node, i just ran 2 commands</p>

<pre><code>a)kubeadm reset
b)kubeadm join ......... ..... ..... ....
</code></pre>

<p>So do I need to do anything like I did following on master Node?</p>

<pre><code>a)kubeadm init
b)kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
</code></pre>

<p>As I had not done <strong>kubeadm init</strong> because i think it will become master node, 
anyway i am not able to use any command like kubectl get nodes,kubectl get pods.</p>

<p>My Master Node and Worker Node status are ready</p>

<p>I deployed one pod on master node and i am able to do <strong>ping www.google.com</strong></p>

<p>but when i deployed one pod using </p>

<pre><code>spec:
     nodeSelector :
       nodeName : nodeName
</code></pre>

<p>So i successfully deployed pod on Worker Node using label</p>

<p>But i can't able to ping inside pod</p>

<p>Output of commands from Master Node :-</p>

<pre><code>aquilak8suser@ip-172-31-6-149:/$ kubectl get nodes
NAME              STATUS   ROLES    AGE     VERSION
ip-172-31-11-87   Ready    &lt;none&gt;   4h35m   v1.13.3
ip-172-31-6-149   Ready    master   11h     v1.13.3




aquilak8suser@ip-172-31-6-149:/$ kubectl get pods -n kube-system -o wide
NAME                                       READY   STATUS    RESTARTS   AGE     IP               NODE              NOMINATED NODE   READINESS GATES
calico-kube-controllers-5f454f49dd-75r5w   1/1     Running   0          11h     192.168.179.67   ip-172-31-6-149   &lt;none&gt;           &lt;none&gt;
calico-node-298r4                          0/1     Running   0          11h     172.31.6.149     ip-172-31-6-149   &lt;none&gt;           &lt;none&gt;
calico-node-5979v                          0/1     Running   0          4h37m   172.31.11.87     ip-172-31-11-87   &lt;none&gt;           &lt;none&gt;
coredns-86c58d9df4-6rzt2                   1/1     Running   0          11h     192.168.179.65   ip-172-31-6-149   &lt;none&gt;           &lt;none&gt;
coredns-86c58d9df4-722tb                   1/1     Running   0          11h     192.168.179.66   ip-172-31-6-149   &lt;none&gt;           &lt;none&gt;
etcd-ip-172-31-6-149                       1/1     Running   0          11h     172.31.6.149     ip-172-31-6-149   &lt;none&gt;           &lt;none&gt;
kube-apiserver-ip-172-31-6-149             1/1     Running   0          11h     172.31.6.149     ip-172-31-6-149   &lt;none&gt;           &lt;none&gt;
kube-controller-manager-ip-172-31-6-149    1/1     Running   0          11h     172.31.6.149     ip-172-31-6-149   &lt;none&gt;           &lt;none&gt;
kube-proxy-496gh                           1/1     Running   0          4h37m   172.31.11.87     ip-172-31-11-87   &lt;none&gt;           &lt;none&gt;
kube-proxy-7684r                           1/1     Running   0          11h     172.31.6.149     ip-172-31-6-149   &lt;none&gt;           &lt;none&gt;
kube-scheduler-ip-172-31-6-149             1/1     Running   0          11h     172.31.6.149     ip-172-31-6-149   &lt;none&gt;           &lt;none&gt;

aquilak8suser@ip-172-31-6-149:/$ kubectl logs coredns-86c58d9df4-6rzt2 --tail=200 -n kube-system
.:53
2019-06-06T04:20:31.271Z [INFO] CoreDNS-1.2.6
2019-06-06T04:20:31.271Z [INFO] linux/amd64, go1.11.2, 756749c
CoreDNS-1.2.6
linux/amd64, go1.11.2, 756749c
 [INFO] plugin/reload: Running configuration MD5 = f65c4821c8a9b7b5eb30fa4fbc167769


root@spring-boot-demo-pricing-66f668cbb4-q5dc2:/# cat /etc/resolv.conf
nameserver 10.96.0.10
search default.svc.cluster.local svc.cluster.local cluster.local us-east-2.compute.internal
options ndots:5
root@spring-boot-demo-pricing-66f668cbb4-q5dc2:/#
</code></pre>

Dhanraj
<ol>
<li><p>No you need not to run <code>kubeadm init</code> or <code>kubectl apply -f "https://cloud.weave......</code> in worker nodes. <a href="https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/" rel="nofollow noreferrer">Check</a></p></li>
<li><p>To use kubectl commands from worker nodes you need to transfer the /etc/kubernetes/admin.conf file to worker nodes and put it in /{username}/.kube/config</p></li>
</ol>

<p><code>scp /etc/kubernetes/admin.conf {workerNoderUser}@{workerNoderIP}:/{username}/.kube/config</code></p>

<p>once you transfer the config you can run kubectl commands in worker nodes as well.</p>

<ol start="3">
<li>There can be many reasons for not being able to ping from the worker node's pod. First check if your worker node itself can ping to google.com or not. if that works then check your cluster dns which is kube-dns or coredns, check their logs and if they are healthy. you may also try to delete the /etc/resolv.conf and add public dns servers like that of google's (8.8.8.8). Lastly you can follow <a href="https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/" rel="nofollow noreferrer">this</a></li>
</ol>
