<p>I am setting up Kubernetes for the first on my local machine using Minikube.</p>
<p>I installed kubectl on my local machine using:</p>
<pre><code>curl -LO &quot;https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl&quot;
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
</code></pre>
<p>However, when I run the command:</p>
<pre><code>minikube start
</code></pre>
<p>I get the following error:</p>
<pre><code>🎉  minikube 1.12.3 is available! Download it: https://github.com/kubernetes/minikube/releases/tag/v1.12.3
💡  To disable this notice, run: 'minikube config set WantUpdateNotification false'

🙄  minikube v1.5.2 on Ubuntu 18.04
💡  Tip: Use 'minikube start -p &lt;name&gt;' to create a new cluster, or 'minikube delete' to delete this one.
🔄  Starting existing virtualbox VM for &quot;minikube&quot; ...
⌛  Waiting for the host to be provisioned ...
🐳  Preparing Kubernetes v1.16.2 on Docker '18.09.9' ...
🔄  Relaunching Kubernetes using kubeadm ... 
⌛  Waiting for: apiserver
🏄  Done! kubectl is now configured to use &quot;minikube&quot;
⚠️  /usr/local/bin/kubectl is version 1.19.0, and is incompatible with Kubernetes 1.16.2. You will need to update /usr/local/bin/kubectl or use 'minikube kubectl' to connect with this cluster
</code></pre>
<p>I don't seem to understand what the error means by:</p>
<pre><code>⚠️  /usr/local/bin/kubectl is version 1.19.0, and is incompatible with Kubernetes 1.16.2. You will need to update /usr/local/bin/kubectl or use 'minikube kubectl' to connect with this cluster
</code></pre>
<p>I can't remember installing <strong>minikube</strong> or <strong>Kubernetes</strong> before now on my local machine.</p>

Promise Preston
<p>I finally figured it out what the issue was.</p>
<p>I ran the command <code>kubectl version</code> and I got the following output:</p>
<pre><code>Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;19&quot;, GitVersion:&quot;v1.19.0&quot;, 

GitCommit:&quot;e19964183377d0ec2052d1f1fa930c4d7575bd50&quot;, GitTreeState:&quot;clean&quot;, 

BuildDate:&quot;2020-08-26T14:30:33Z&quot;, GoVersion:&quot;go1.15&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}


Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;16&quot;, GitVersion:&quot;v1.16.2&quot;, 

GitCommit:&quot;c97fe5036ef3df2967d086711e6c0c405941e14b&quot;, GitTreeState:&quot;clean&quot;, 

BuildDate:&quot;2019-10-15T19:09:08Z&quot;, GoVersion:&quot;go1.12.10&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
</code></pre>
<p>It showed me the date when I installed Kubernetes using <strong>minikube</strong> installer, which was sometime in 2019 when I was trying out <strong>Kubenetes</strong> initially.</p>
<p><strong>Here's how I fixed it</strong>:</p>
<p>There are 2 solutions:</p>
<p><strong>Solution 1</strong></p>
<p>Uninstall older/previous versions of <strong>Kubernetes</strong> using <strong>minikube</strong> on the Linux machine:</p>
<pre><code>minikube stop; minikube delete
docker stop (docker ps -aq)
rm -r ~/.kube ~/.minikube
sudo rm /usr/local/bin/localkube /usr/local/bin/minikube
systemctl stop '*kubelet*.mount'
sudo rm -rf /etc/kubernetes/
docker system prune -af --volumes
</code></pre>
<p>Or on Mac:</p>
<pre><code>minikube stop; minikube delete &amp;&amp;
docker stop $(docker ps -aq) &amp;&amp;
rm -rf ~/.kube ~/.minikube &amp;&amp;
sudo rm -rf /usr/local/bin/localkube /usr/local/bin/minikube &amp;&amp;
launchctl stop '*kubelet*.mount' &amp;&amp;
launchctl stop localkube.service &amp;&amp;
launchctl disable localkube.service &amp;&amp;
sudo rm -rf /etc/kubernetes/ &amp;&amp;
docker system prune -af --volumes
</code></pre>
<p>Reinstall a new copy of <strong>minikube</strong>:</p>
<pre><code>curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb

sudo dpkg -i minikube_latest_amd64.deb
</code></pre>
<p>And then run the command below to pull a new base image of Kubernetes:</p>
<pre><code>minkube start
</code></pre>
<p>This pulls a new image of <strong>Kubernetes</strong>, and also configures <strong>kubectl</strong> to use <strong>minikube</strong>.</p>
<p><strong>Solution 2</strong>:</p>
<p>Run the command below to downgrade <strong>kubectl</strong> to the same version as <strong>Kubenetes</strong> on the local machine:</p>
<pre><code>minikube kubectl
</code></pre>
<p>This will install the <strong>kubectl</strong> compatible version for <strong>Kubernetes</strong> using <strong>minikube</strong></p>
<p>That's all.</p>
<p><strong>I hope this helps</strong></p>
