Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubectl cannot connect to minikube api-server on windows 10 #1943

Closed
fatcat6 opened this issue Sep 11, 2017 · 8 comments
Closed

Kubectl cannot connect to minikube api-server on windows 10 #1943

fatcat6 opened this issue Sep 11, 2017 · 8 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. os/windows

Comments

@fatcat6
Copy link

fatcat6 commented Sep 11, 2017

Env
OS: Windows 10, 64 bit
VM driver: hyperv
Minikube version: v0.22.0
kubectl version: v1.7.0

Steps

  1. Running "minikube start --kubernetes-version="v1.7.0" --vm-driver="hyperv" --hyperv-virtual-switch="My Virtual Switch" --v=7" does not generate ".\kube\config" file, but VM "minikube" started and running in hyperv. can log in as "root" user.

  2. Manually running kubectl config cluster, context and
    kubectl config set-cluster minikube --server='https://192.168.1.125' --certificate-authority='C:\Users\xxx.minikube\certs\ca.pem'

kubectl config set-context minikube --cluster=minikube --user='minikube'
kubectl config use-context minikube

kubectl config set-credentials minikube --client-certificate='C:\Users\xxx.minikube\certs\cert.pem' --client-key='C:\Users\xxx.minikube\certs\key.pem'

I tried both secure and "--insecure-skip-tls-verify=true", but still not working.

Command and Error messages
PS C:\Users\xxx> kubectl cluster-info
Kubernetes master is running at https://192.168.1.125

PS C:\Users\xxx> kubectl cluster-info dump Unable to connect to the server: dial tcp 192.168.1.125:443: connectex: No connection could be made because the target machine actively refused it.

Questions:

  1. What is the reason ".kube/config" file not being generated automatically?
  2. Are my " client-certificate" and "client-key" right?
  3. How do I get the right server ip address for "set-cluster" CLI command?

Thanks!

@zlemisie
Copy link

I've got the same problem.
#1981 fixed the issue

@EricssonVNFCloud
Copy link

I am still facing this issue in Windows 7

@fatcat6
Copy link
Author

fatcat6 commented Sep 26, 2017

Works on my windows 10 laptop by using "https://storage.googleapis.com/minikube-builds/1982/minikube-windows-amd64.exe". Thanks!

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 6, 2018
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 10, 2018
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@amansingh2604
Copy link

in windows 7 in cmd when i type kubectl version i got this error

Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.0", GitCom
mit:"ddf47ac13c1a9483ea035a79cd7c10005ff21a6d", GitTreeState:"clean", BuildDate:
"2018-12-03T21:04:45Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"windows/a
md64"}
Unable to connect to the server: dial tcp 192.168.99.100:8443: connectex: A conn
ection attempt failed because the connected party did not properly respond after
a period of time, or established connection failed because connected host has f
ailed to respond.

Please help me out!!

@abhishekweb
Copy link

@amansingh2604 have you found solution for your posted problem. I am facing same issue :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. os/windows
Projects
None yet
Development

No branches or pull requests

8 participants