<p>I'm seeing the following error when running kubectl commands against my local cluster (Minikube and through Dockers new Kubernetes functionality)</p>

<pre><code>Unable to connect to the server: net/http: TLS handshake timeout
</code></pre>

<p>All commands work (create deployment, check pods etc) until this error seemingly randomly rears its head. After the first occurrence of this, it won't stop occurring for any and all kubectl commands rendering kubectl useless. The only way to stop it is to completely destroy the local cluster and start again ... until is happens again 5 minutes later!</p>

<p>Can anyone shed some light onto this please? Please note a lot of people are asking about this sort of issue in regards to AWS, GCE etc and they have different resolutions based on the platform they are running on, I am yet to see a solution for this when it occurs locally.</p>

<p>Solved by increasing the memory available to Docker from 2gb up to 8gb.</p>

<p>To do this, click on the docker icon -> Preferences -> Advanced, then use the slider for "Memory" to increase the available memory to the docker process as you wish.</p>

<p>@Koshmaar I hope that helps you as well!</p>
