Kubernetes: Freshly installed kubectl on Windows refuses to run simple commands

Created on 1 May 2017  ·  1Comment  ·  Source: kubernetes/kubernetes

Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.): a bug report could be classified as request for help, but primarily this is a bug report because this product does not behave as documented.

What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.):

No connection could be made because the target machine actively refused it

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Kubernetes version (use kubectl version): 1.6.2

Environment:

  • Cloud provider or hardware configuration: gcloud
  • OS (e.g. from /etc/os-release): Widows 10
  • Kernel (e.g. uname -a): N/A
  • Install tools: gcloud, kubectl
  • Others:

What happened:

  • Freshly installed gcloud and kubectl running gcloud components install kubectl, all successful, no errors, no warnings
  • Ran gcloud init and gcloud auth login - success
  • Ran kubectl get pods, got this error, quote:
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.

In fact, even kubectl version shows the same error

What you expected to happen:

Commands running according to their --help as documented. I.e. kubectl get pod should show me my pods not the error.

How to reproduce it (as minimally and precisely as possible):

As described above: install Google Cloud SDK on a Windows 10 machine, and further on according to the scenario described in the What happened section above↑

Anything else we need to know:

Just ask.

Most helpful comment

Figured it out: need to run gcloud container clusters get-credentials cluster-id before running kubectl

>All comments

Figured it out: need to run gcloud container clusters get-credentials cluster-id before running kubectl

Was this page helpful?
0 / 5 - 0 ratings