<p>Environment:</p>

<ul>
<li>Kubernetes 1.12.2</li>
<li>Docker 18.9.0</li>
<li>microk8s.kubectl</li>
</ul>

<p>$ k get all</p>

<pre><code>NAME                                          READY   STATUS             
RESTARTS   AGE
pod/mysql-0                                   1/1     Running            0          72s
pod/nginx-ingress-microk8s-controller-c2pgz   0/1     CrashLoopBackOff   129        22h
pod/web-0                                     1/1     Running            0          78s

NAME                    TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)    AGE
service/kubernetes      ClusterIP   10.152.183.1   &lt;none&gt;        443/TCP    70m
service/mysql-service   ClusterIP   None           &lt;none&gt;        3306/TCP   72s
service/nginx-service   ClusterIP   None           &lt;none&gt;        80/TCP     78s

NAME                                               DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
daemonset.apps/nginx-ingress-microk8s-controller   1         1         0       1            0           &lt;none&gt;          2d22h

NAME                     DESIRED   CURRENT   AGE
statefulset.apps/mysql   1         1         72s
statefulset.apps/web     1         1         78s
</code></pre>

<p>/var/log/syslog:</p>

<pre><code>failed to load Kubelet config file /var/lib/kubelet/config.yaml, error failed to read kubelet config file "/var/lib/kubelet/config.yaml", error: open /var/lib/kubelet/config.yaml: no such file or directory

Error syncing pod f0ab0f74-e6f2-11e8-8410-482ae31e6a94 ("nginx-ingress-microk8s-controller-c2pgz_default(f0ab0f74-e6f2-11e8-8410-482ae31e6a94)"), skipping: failed to "StartContainer" for "nginx-ingress-microk8s" with CrashLoopBackOff: "Back-off 5m0s restarting failed container=nginx-ingress-microk8s pod=nginx-ingress-microk8s-controller-c2pgz_default(f0ab0f74-e6f2-11e8-8410-482ae31e6a94)"
</code></pre>

<p>What is nginx-ingress-microk8s-controller-c2pgz? Who started it?</p>

<p>You mentioned in the comments that the reason is related to <code>kubeadm init</code> fails.</p>
<p>The <code>/var/lib/kubelet/config.yaml</code> config file is being populated only after:</p>
<ol>
<li><p>A successful cluster initialization (<code>kubeadmin init</code>) in the master node.</p>
</li>
<li><p>In the worker node -  after a successful joining to the cluster (<code>kubeadm join</code>).</p>
</li>
</ol>
<p>So if the problem is with <code>kubeadm init</code> you should check the command's output (also great if you could paste it in the question).<br>
Make sure you <strong>don't</strong> run kubeadm init with the <code>--ignore-preflight-errors=all</code> flag.</p>
<p>I'm not familiar with your specific error, but in order for the answer to be more helpful - I'll try to give some possible solutions:</p>
<ol>
<li><p>Make sure <a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/" rel="nofollow noreferrer">all requirements</a> for kubeadm are in place.</p>
</li>
<li><p>Check the firewall rules - make sure you don't block egress traffic and that port <code>6443</code> ingress rule is open for the worker node (relevant for the joining phase).</p>
</li>
<li><p>Make sure that the <a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#check-required-ports" rel="nofollow noreferrer">required ports</a> are not occupied.</p>
</li>
<li><p>Try restarting Kubelet with <code>systemctl restart kubelet</code> and check latest logs with: <br> <code>sudo journalctl -u kubelet -n 100 --no-pager</code>.</p>
</li>
<li><p>Check if Docker version can be updated to a newer stabler one.</p>
</li>
<li><p>Try running <code>kubeadm reset</code> and make sure you re-run <code>kubeadm init</code> with latest version or with the specific stable version by addding <code>--kubernetes-version=X.Y.Z</code>.</p>
</li>
</ol>
