I am getting the following error when trying to run kubectl locally.
kubectl
error: couldn\'t read version from server: Get http://localhost:8080/api: dial tc
I was using Google Container Engine (GKE) and got this error, too. In my case, it was because I forgot to create a container cluster first.
If you create a cluster using the gcloud command, it sets the config for the you.
gcloud container clusters create my-cluster-name