<p>I wondered when i restart my ubuntu machine on which i have setup kubernetes master with flannel. before reboot it's working fine. but after reboot master node is not in ready state.</p>

<p>I try to get node details using describe.</p>

<pre><code>KubeletNotReady runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
</code></pre>

<p>This error is printed in logs. i search about this and find some solutions like reinitialize flannel.yml but didn't work.</p>

<p><a href="https://github.com/kubernetes/kubeadm/issues/1031" rel="nofollow noreferrer">https://github.com/kubernetes/kubeadm/issues/1031</a>    As per provided solution here, reinstall docker in machine. that's works.
every thing works fine after reinstall docker on machine. Can any one explain me why this happend? as if i restart machine then every time i need to reinstall docker? or is there any other setting or configuration which i missing?
Thank you</p>

Vinit Patel
<p>Based on the provided information there are couple of steps and points to be 
taken into consideration when you encounter this kind of issue:</p>

<p>First check is to verify if file <code>10-flannel.conflist</code> is not missing from <code>/etc/cni/net.d/</code>. You should have a file with this kind of information there:</p>

<pre><code>{
 "name": "cbr0",
 "cniVersion": "0.3.1",
 "plugins": [
   {
     "type": "flannel",
     "delegate": {
       "hairpinMode": true,
       "isDefaultGateway": true
     }
   },
   {
     "type": "portmap",
     "capabilities": {
       "portMappings": true
     }
</code></pre>

<p>If your file is placed there please check if you specifically have <code>cniVersion</code> field there.
In some flannel deployments there was missing the <code>cniVersion</code> field.</p>

<p>Second troubleshoot check is too check <code>kubelet</code> logs. Kubelet could report some problems with not finding cni config.
You may find logs at: <code>/var/log/kubelet.log</code></p>

<p>Also very useful is to check output of <code>journalctl -fu kubelet</code> and see if nothing wrong is happening there. 
In some cases restart <code>kubelet</code> might be helpful, you can do that using <code>systemctl restart kubelet</code> </p>

<p>If you suspect that the docker is causing a problem you can check docker logs in similar way you checked the kukubelet logs 
using <code>journalctl -ul docker</code>. If the docker is causing some issuse try to restart the docker service before reinstalling it 
using <code>sudo systemctl restart docker.service</code> </p>

<p>Finally it is really worth following exactly <a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/" rel="nofollow noreferrer">official documentation</a> with creating kubeadm clusters, espcially the pod <a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#pod-network" rel="nofollow noreferrer">network section</a>.
Please note that it is important to hold all the binaries to prevent them from unwanted updates. 
Kubernetes has also a very good <a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/" rel="nofollow noreferrer">troubleshoot document</a> regarding <code>kubeadm</code>. </p>

<p>Hope this helps. </p>
