I have followed the helloword tutorial on http://kubernetes.io/docs/hellonode/.
When I run:
kubectl run hello-node --image=gcr.io/PROJECT_ID/hello-node
Reinitialising gcloud with proper account and project worked for me.
gcloud init
After this retrying the below command was successful and kubeconfig entry was generated.
gcloud container clusters get-credentials "cluster_name"
check the cluster info with
kubectl cluster-info
Just make sure to follow: https://cloud.google.com/container-engine/docs/before-you-begin before http://kubernetes.io/docs/hellonode/
I had this problem using a local docker. The thing to do is check the logs of the containers its spins up to figure out what went wrong. For me it transpired that etcd had fallen over
$ docker logs <etcdContainerId>
<snip>
2016-06-15 09:02:32.868569 C | etcdmain: listen tcp 127.0.0.1:7001: bind: address already in use
Aha! I'd been playing with Cassandra in a docker container and I'd forwarded all the ports since I wasn't sure which it needed exposed and 7001 is one of its ports. Stopping Cassandra, cleaning up the mess and restarting it fixed things.
I have a smae issue. in my scenario there is kubernetes API server is not responding. so check you kubernetes API server and controller as well as.
I had the same issue after a reboot, I followed the guide described here
So try the following:
$ sudo -i
# swapoff -a
# exit
$ strace -eopenat kubectl version
After that it works fine.
I got the same trouble since nearly release, seem must use KUBECONFIG explicit
sudo cp /etc/kubernetes/admin.conf $HOME/
sudo chown $(id -u):$(id -g) $HOME/admin.conf
export KUBECONFIG=$HOME/admin.conf