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 itIs this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT
Kubernetes version (use kubectl version): 1.6.2
Environment:
uname -a): N/Agcloud, kubectlWhat happened:
gcloud and kubectl running gcloud components install kubectl, all successful, no errors, no warningsgcloud init and gcloud auth login - successkubectl 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.
Figured it out: need to run gcloud container clusters get-credentials cluster-id before running kubectl
Most helpful comment
Figured it out: need to run
gcloud container clusters get-credentials cluster-idbefore runningkubectl