<p>I am working on minikube inside a vmware (ubuntu 16.04).<br />
Everything was fine for couple of weeks.</p>
<p>One day I came and noticeds that all my pods stucked on &quot;pending&quot;.<br />
I <code>describe</code> one of the pods and saw:</p>
<blockquote>
<p>no nodes available to schedule pods</p>
</blockquote>
<p>I uninstalled minikube:</p>
<pre><code>minikube stop; minikube delete &amp;&amp;
docker stop $(docker ps -aq) &amp;&amp;
rm -rf ~/.kube ~/.minikube &amp;&amp;
rm -rf /usr/local/bin/localkube /usr/local/bin/minikube &amp;&amp;
rm -rf /etc/kubernetes/ &amp;&amp;
docker system prune -af --volumes
systemctl stop kubelet  
systemctl disable kubelet
</code></pre>
<p>Installed it again:</p>
<pre><code>curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 &amp;&amp; chmod +x minikube &amp;&amp; mv minikube /usr/local/bin/  

swapoff -a
minikube start --vm-driver=none
mv /root/.minikube $HOME/.minikube # this will write over any previous configuration
chown -R $USER $HOME/.minikube
chgrp -R $USER $HOME/.minikube
</code></pre>
<p>When I run <code>kubectl get nodes I received:   </code>The connection to the server 192.168.21.129:8443 was refused - did you specify the right host or port?`</p>
<p>I ran <code>docker ps -a</code>:</p>
<pre><code>CONTAINER ID        IMAGE                  COMMAND                  CREATED              STATUS                      PORTS               NAMES
602e5d1a27c1        3193be46e0b3           &quot;kube-scheduler --ad…&quot;   About a minute ago   Exited (2) 22 seconds ago                       k8s_kube-scheduler_kube-scheduler-minikube_kube-system_9729a196c4723b60ab401eaff722982d_1
29208eeb5f46        k8s.gcr.io/pause:3.1   &quot;/pause&quot;                 2 minutes ago        Exited (0) 22 seconds ago                       k8s_POD_kube-scheduler-minikube_kube-system_9729a196c4723b60ab401eaff722982d_0
</code></pre>
<p>I have only 2 pods which are exited...<br />
What happens here?<br />
I uninstalled it deeply as I can (or not?).</p>
<p>How to troubleshoot it and fix ?</p>
<p><strong>EDIT:</strong><br />
I uninstalled Minikube but now also removed the <code>kubelet</code> service like that:<br />
I followed the instruction of removing service from <a href="https://superuser.com/a/936976/673080">here</a>:</p>
<pre><code>systemctl stop kubelet  
systemctl disable kubelet  
rm -rf /etc/systemd/system/kubelet.service.d
rm -rf /lib/systemd/system/kubelet.service
rm -rf /var/lib/kubelet
rm -rf /usr/libexec/kubernetes/kubelet-plugins
rm -rf /usr/bin/kubelet
systemctl daemon-reload
systemctl reset-failed  
</code></pre>
<p>I searched to see if I still have it on my system with <code>find / | grep kubelet</code> and found lots of files under <code>/sys/kernel/slab</code>. I restarted the machine and it gone.</p>
<p>I installed again minikube and in the beginning I received errors about kubelet:</p>
<pre><code>sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data-minikube --ignore-preflight-errors=Port-10250 --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-etcd.yaml --ignore-preflight-errors=Swap --ignore-preflight-errors=CRI 

 output: [init] Using Kubernetes version: v1.13.2
[preflight] Running pre-flight checks
    [WARNING FileExisting-ebtables]: ebtables not found in system path
    [WARNING FileExisting-socat]: socat not found in system path
    [WARNING SystemVerification]: this Docker version is not on the list of validated versions: 18.02.0-ce. Latest validated version: 18.06
    [WARNING Hostname]: hostname &quot;minikube&quot; could not be reached
    [WARNING Hostname]: hostname &quot;minikube&quot;: lookup minikube on 127.0.1.1:53: server misbehaving
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
[kubelet-start] Writing kubelet environment file with flags to file &quot;/var/lib/kubelet/kubeadm-flags.env&quot;
[kubelet-start] Writing kubelet configuration to file &quot;/var/lib/kubelet/config.yaml&quot;
[kubelet-start] Activating the kubelet service
[certs] Using certificateDir folder &quot;/var/lib/minikube/certs/&quot;
[certs] Generating &quot;etcd/ca&quot; certificate and key
[certs] Generating &quot;etcd/server&quot; certificate and key
[certs] etcd/server serving cert is signed for DNS names [minikube localhost] and IPs [192.168.21.129 127.0.0.1 ::1]
[certs] Generating &quot;etcd/peer&quot; certificate and key
[certs] etcd/peer serving cert is signed for DNS names [minikube localhost] and IPs [192.168.21.129 127.0.0.1 ::1]
[certs] Generating &quot;etcd/healthcheck-client&quot; certificate and key
[certs] Generating &quot;apiserver-etcd-client&quot; certificate and key
[certs] Generating &quot;front-proxy-ca&quot; certificate and key
[certs] Generating &quot;front-proxy-client&quot; certificate and key
[certs] Using existing ca certificate authority
[certs] Using existing apiserver certificate and key on disk
[certs] Generating &quot;apiserver-kubelet-client&quot; certificate and key
[certs] Generating &quot;sa&quot; key and public key
[kubeconfig] Using kubeconfig folder &quot;/etc/kubernetes&quot;
[kubeconfig] Writing &quot;admin.conf&quot; kubeconfig file
[kubeconfig] Writing &quot;kubelet.conf&quot; kubeconfig file
[kubeconfig] Writing &quot;controller-manager.conf&quot; kubeconfig file
[kubeconfig] Writing &quot;scheduler.conf&quot; kubeconfig file
[control-plane] Using manifest folder &quot;/etc/kubernetes/manifests&quot;
[control-plane] Creating static Pod manifest for &quot;kube-apiserver&quot;
[control-plane] Creating static Pod manifest for &quot;kube-controller-manager&quot;
[control-plane] Creating static Pod manifest for &quot;kube-scheduler&quot;
[etcd] Creating static Pod manifest for local etcd in &quot;/etc/kubernetes/manifests&quot;
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory &quot;/etc/kubernetes/manifests&quot;. This can take up to 4m0s
[kubelet-check] Initial timeout of 40s passed.

Unfortunately, an error has occurred:
    timed out waiting for the condition

This error is likely caused by:
    - The kubelet is not running
    - The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)

If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
    - 'systemctl status kubelet'
    - 'journalctl -xeu kubelet'

Additionally, a control plane component may have crashed or exited when started by the container runtime.
To troubleshoot, list all containers using your preferred container runtimes CLI, e.g. docker.
Here is one example how you may list all Kubernetes containers running in docker:
    - 'docker ps -a | grep kube | grep -v pause'
    Once you have found the failing container, you can inspect its logs with:
    - 'docker logs CONTAINERID'
error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster
: running command: 
sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data-minikube --ignore-preflight-errors=Port-10250 --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-etcd.yaml --ignore-preflight-errors=Swap --ignore-preflight-errors=CRI 
</code></pre>
<p>I tried to start it again and then it wrote that it succeed but then again, all the containers are being deleted.<br />
I think it related to the kubelet but I removed it and reinstalled completely.</p>

E235
<p>One of the errors was:  </p>

<blockquote>
  <p>[WARNING SystemVerification]: this Docker version is not on the list
  of validated versions: 18.02.0-ce. Latest validated version: 18.06  </p>
</blockquote>

<p>I decided to also remove docker.  </p>

<p>This is the full uninstall process I did:  </p>

<pre><code># Remove minikube
minikube stop; minikube delete &amp;&amp;
docker stop $(docker ps -aq) &amp;&amp;
rm -rf ~/.kube ~/.minikube &amp;&amp;
rm -rf /usr/local/bin/localkube /usr/local/bin/minikube &amp;&amp;
rm -rf /etc/kubernetes/ &amp;&amp;
docker system prune -af --volumes
# remove kubelet
systemctl stop kubelet  
systemctl disable kubelet
rm -rf /etc/systemd/system/kubelet.service.d
rm -rf /lib/systemd/system/kubelet.service
rm -rf /var/lib/kubelet
rm -rf /usr/libexec/kubernetes/kubelet-plugins
rm -rf /usr/bin/kubelet
systemctl daemon-reload
systemctl reset-failed  
# uninstall docker
dpkg -l | grep -i docker
apt-get purge -y docker.io
rm -rf /var/lib/docker
apt-get autoremove -y --purge docker.io
apt-get autoclean
# remove other pieces
rm -rf /home/myuser/.minikube
rm -rf ~/.kube
rm -f /var/lib/dpkg/info/kubelet*
rm -f /var/cache/apt/archives/kubelet_1.13.2-00_amd64.deb
rm -f /var/lib/systemd/deb-systemd-helper-enabled/kubelet.service.dsh-also
rm -f /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/kubelet.service
rm -f /etc/default/kubelet
</code></pre>

<p>I restart my machine and install everything:  </p>

<pre><code>apt-get install -y docker.io 
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 &amp;&amp; chmod +x minikube &amp;&amp; mv minikube /usr/local/bin/  
swapoff -a
minikube start --v=3 --vm-driver=none  
</code></pre>

<p>Now everything works fine.  </p>
