<p>I have installed minikube and started up its built in Kubernertes cluster</p>

<pre><code>$ minikube start
Starting local Kubernetes cluster...
Kubernetes is available at https://192.168.99.100:443.
Kubectl is now configured to use the cluster.
</code></pre>

<p>I also have kubectl installed</p>

<pre><code>$ kubectl version
Client Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.0", GitCommit:"283137936a498aed572ee22af6774b6fb6e9fd94", GitTreeState:"clean", BuildDate:"2016-07-01T19:26:38Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"}
</code></pre>

<p>But I can't successfully use kubectl to speak to the running Kubernetes cluster</p>

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

<hr>

<p>EDIT</p>

<pre><code>$ minikube logs 

E0712 19:02:08.767815    1257 docker_manager.go:1955] Failed to create pod infra container: ImagePullBackOff; Skipping pod "kube-addon-manager-minikubevm_kube-system(48abed82af93bb0b941173334110923f)": Back-off pulling image "gcr.io/google_containers/pause-amd64:3.0"
E0712 19:02:08.767875    1257 pod_workers.go:183] Error syncing pod 48abed82af93bb0b941173334110923f, skipping: failed to "StartContainer" for "POD" with ImagePullBackOff: "Back-off pulling image \"gcr.io/google_containers/pause-amd64:3.0\""
E0712 19:02:23.767380    1257 docker_manager.go:1955] Failed to create pod infra container: ImagePullBackOff; Skipping pod "kube-addon-manager-minikubevm_kube-system(48abed82af93bb0b941173334110923f)": Back-off pulling image "gcr.io/google_containers/pause-amd64:3.0"
E0712 19:02:23.767464    1257 pod_workers.go:183] Error syncing pod 48abed82af93bb0b941173334110923f, skipping: failed to "StartContainer" for "POD" with ImagePullBackOff: "Back-off pulling image \"gcr.io/google_containers/pause-amd64:3.0\""
E0712 19:02:36.766696    1257 docker_manager.go:1955] Failed to create pod infra container: ImagePullBackOff; Skipping pod "kube-addon-manager-minikubevm_kube-system(48abed82af93bb0b941173334110923f)": Back-off pulling image "gcr.io/google_containers/pause-amd64:3.0"
E0712 19:02:36.766760    1257 pod_workers.go:183] Error syncing pod 48abed82af93bb0b941173334110923f, skipping: failed to "StartContainer" for "POD" with ImagePullBackOff: "Back-off pulling image \"gcr.io/google_containers/pause-amd64:3.0\""
E0712 19:02:51.767621    1257 docker_manager.go:1955] Failed to create pod infra container: ImagePullBackOff; Skipping pod "kube-addon-manager-minikubevm_kube-system(48abed82af93bb0b941173334110923f)": Back-off pulling image "gcr.io/google_containers/pause-amd64:3.0"
E0712 19:02:51.767672    1257 pod_workers.go:183] Error syncing pod 48abed82af93bb0b941173334110923f, skipping: failed to "StartContainer" for "POD" with ImagePullBackOff: "Back-off pulling image \"gcr.io/google_containers/pause-amd64:3.0\""
E0712 19:03:02.766548    1257 docker_manager.go:1955] Failed to create pod infra container: ImagePullBackOff; Skipping pod "kube-addon-manager-minikubevm_kube-system(48abed82af93bb0b941173334110923f)": Back-off pulling image "gcr.io/google_containers/pause-amd64:3.0"
E0712 19:03:02.766609    1257 pod_workers.go:183] Error syncing pod 48abed82af93bb0b941173334110923f, skipping: failed to "StartContainer" for "POD" with ImagePullBackOff: "Back-off pulling image \"gcr.io/google_containers/pause-amd64:3.0\""
E0712 19:03:16.766831    1257 docker_manager.go:1955] Failed to create pod infra container: ImagePullBackOff; Skipping pod "kube-addon-manager-minikubevm_kube-system(48abed82af93bb0b941173334110923f)": Back-off pulling image "gcr.io/google_containers/pause-amd64:3.0"
E0712 19:03:16.766904    1257 pod_workers.go:183] Error syncing pod 48abed82af93bb0b941173334110923f, skipping: failed to "StartContainer" for "POD" with ImagePullBackOff: "Back-off pulling image \"gcr.io/google_containers/pause-amd64:3.0\""
E0712 19:04:15.829223    1257 docker_manager.go:1955] Failed to create pod infra container: ErrImagePull; Skipping pod "kube-addon-manager-minikubevm_kube-system(48abed82af93bb0b941173334110923f)": image pull failed for gcr.io/google_containers/pause-amd64:3.0, this may be because there are no credentials on this request.  details: (Error response from daemon: Get https://gcr.io/v1/_ping: dial tcp 74.125.28.82:443: i/o timeout)
E0712 19:04:15.829326    1257 pod_workers.go:183] Error syncing pod 48abed82af93bb0b941173334110923f, skipping: failed to "StartContainer" for "POD" with ErrImagePull: "image pull failed for gcr.io/google_containers/pause-amd64:3.0, this may be because there are no credentials on this request.  details: (Error response from daemon: Get https://gcr.io/v1/_ping: dial tcp 74.125.28.82:443: i/o timeout)"
E0712 19:04:31.767536    1257 docker_manager.go:1955] Failed to create pod infra container: ImagePullBackOff; Skipping pod "kube-addon-manager-minikubevm_kube-system(48abed82af93bb0b941173334110923f)": Back-off pulling image "gcr.io/google_containers/pause-amd64:3.0"
</code></pre>

<p>To get it running behind the a proxy you need to setup things a bit differently from the documentation.
a. You need to ensure that the docker daemon running with the VM can reach out to the internet via the proxy. 
b. You need to ensure kubectl running on the host can get to the VM without going out through the proxy</p>

<p>Using the default kubectl example</p>

<ol>
<li>Ensure that the proxy is passed into the VM that is created by minikube (this ensures that the docker daemon within the VM can get out to the internet)</li>
</ol>

<p><code>minikube start --vm-driver="kvm" --docker-env="http_proxy=xxx" --docker-env="https_proxy=yyy" start</code></p>

<p>Note: Replace xxx and yyy with your proxy settings</p>

<ol start="2">
<li>Get the IP that the VM gets at startup.</li>
</ol>

<p><code>minikube ip</code></p>

<p>Note: You need to do this each time you setup minikube as it can change</p>

<ol start="3">
<li>Ensure that kubectl can talk to this VM without going to the proxy</li>
</ol>

<p><code>export no_proxy="127.0.0.1,[minikube_ip]"</code></p>

<ol start="4">
<li>Now kick off the POD and test it</li>
</ol>

<p><code>kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080</code></p>

<p><code>kubectl expose deployment hello-minikube --type=NodePort</code></p>

<p><code>kubectl get pod</code></p>

<p><code>curl $(minikube service hello-minikube --url)</code></p>
