2

I installed minikube with the below command:

curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ 

Then, I start minikube cluster using

minikube start --vm-driver=none 

When I try to access the dashboard I see the error

minikube dashboard

Could not find finalized endpoint being pointed to by kubernetes-dashboard: Error validating service: Error getting service kubernetes-dashboard: Get https://10.0.2.15:8443/api/v1/namespaces/kube-system/services/kubernetes-dashboard: net/http: TLS handshake timeout

I set the proxy using

set NO_PROXY=localhost,127.0.0.1,10.0.2.15

Still same error.

Any help would be appreciated.

Faysal Ahmed
  • 7,501
  • 5
  • 28
  • 50
Chinmayee Pdas
  • 145
  • 1
  • 2
  • 11
  • Hi, can you check if the dashboard pod is up and running `kubectl get pods -n kube-system` ? – Suresh Vishnoi Mar 16 '18 at 10:18
  • $kubectl get pods Unable to connect to the server: net/http: TLS handshake timeout. – Chinmayee Pdas Mar 16 '18 at 10:27
  • can you check the status of VM with `minikube status` ? – Suresh Vishnoi Mar 16 '18 at 10:29
  • chinmayee@chinmayee-VirtualBox:~$ sudo minikube status minikube: Running cluster: Running kubectl: Correctly Configured: pointing to minikube-vm at 10.0.2.15 – Chinmayee Pdas Mar 16 '18 at 10:31
  • As I understand, VM is up and running however kubectl, minikube is not able to communicate with the API server. So Can you check `kubectl config view`? if client is referring to correct API-server's IP and Port. – Suresh Vishnoi Mar 16 '18 at 10:37
  • $ sudo kubectl config view apiVersion: v1 clusters: - cluster: certificate-authority: /home/chinmayee/.minikube/ca.crt server: https://10.0.2.15:8443 name: minikube contexts: - context: cluster: minikube user: minikube name: minikube current-context: minikube kind: Config preferences: {} users: - name: minikube user: client-certificate: /home/chinmayee/.minikube/client.crt client-key: /home/chinmayee/.minikube/client.key – Chinmayee Pdas Mar 16 '18 at 10:41
  • @SureshVishnoi : Any idea? – Chinmayee Pdas Mar 19 '18 at 04:22
  • Hi, I am curious to know why are you using `--vm-driver=none ` this flag to start minikube ? – Suresh Vishnoi Mar 19 '18 at 12:26
  • $ minikube start --vm-driver=kvm2 Starting local Kubernetes v1.8.0 cluster... Starting VM... Downloading Minikube ISO 140.01 MB / 140.01 MB [============================================] 100.00% 0s E1108 02:38:25.792900 17062 start.go:150] Error starting host: Error creating host: Error creating machine: Error in driver during machine creation: virError(Code=8, Domain=44, Message='invalid argument: could not find capabilities for domaintype=kvm ') – Chinmayee Pdas Mar 20 '18 at 10:12
  • Got the above error, so used vm-driver=none. – Chinmayee Pdas Mar 20 '18 at 10:13
  • chinmayee@chinmayee-VirtualBox:~$ sudo minikube dashboard Could not find finalized endpoint being pointed to by kubernetes-dashboard: Error validating service: Error getting service kubernetes-dashboard: Get https://10.0.2.15:8443/api/v1/namespaces/kube-system/services/kubernetes-dashboard: net/http: TLS handshake timeout – Chinmayee Pdas Mar 20 '18 at 10:13
  • @SureshVishnoi : any help? – Chinmayee Pdas Mar 20 '18 at 10:14
  • I think Usually I use Minikube with `virtual box` it works for me. If you can try with virtual box and lets see how it goes. – Suresh Vishnoi Mar 20 '18 at 10:21
  • @SureshVishnoi : Yes i have a VM created on Oracle VirtualBox. It has ubuntu running. I am running on this. – Chinmayee Pdas Mar 20 '18 at 13:40
  • So you need to use another Virtual box inside that ubuntu VM in order to create a minikube node. It's quite nested Virtualization. I would suggest you run minikube directly on the host machine rather than nested VM. – Suresh Vishnoi Mar 20 '18 at 14:35
  • @SureshVishnoi : vm-driver=none - this driver can be used to run the Kubernetes cluster components on the host instead of in a VM. This is what i see in the git-hub documentation. I am starting kubernetes cluster using this driver – Chinmayee Pdas Mar 21 '18 at 05:28
  • Hi can you give me reference of the docs ? I would like to check it as well. thanks – Suresh Vishnoi Mar 21 '18 at 14:17
  • @SureshVishnoi : https://github.com/kubernetes/minikube – Chinmayee Pdas Mar 25 '18 at 13:11
  • @SureshVishnoi : Any idea what might be going wrong? – Chinmayee Pdas Mar 26 '18 at 05:21
  • This probably doesn't apply to this specific instance so I am not posting it as an answer, but for anyone who happens along this post and has the TLS handshake timeout on Azure this is a known issue with more details over here: https://stackoverflow.com/questions/50726534/unable-to-connect-net-http-tls-handshake-timeout-why-cant-kubectl-connect – Necevil Jun 11 '18 at 16:42

3 Answers3

3

I had the same issue, I was behind corporate proxy, adding minikube ip to the no_proxy env variable on host machine solved the issue.

export no_proxy=$no_proxy,$(minikube ip)
Raja V
  • 31
  • 2
1

I also had same issue, and for me it was happening because minikube VM was short of memory that was allocated.

Increasing Minikube RAM or deleting some exiting deployment, should resolve this issue.

To increase RAM configured for Minikube VM, use below command:

minikube config set memory 4096

After this, there would be need for minikube to stop, delete, and start using below commands.

minikube stop
minikube delete
minikube start
papanito
  • 2,349
  • 2
  • 32
  • 60
  • Your answer might be applicable for some users in the future but ideally you should provide the commands as well. – Uzair A. Nov 23 '18 at 05:55
0

For Windows users change the visualization. for me this worked:

minikube start --vm-driver=docker
Payam Khaninejad
  • 7,692
  • 6
  • 45
  • 55