kubernetes failing to connect on fresh installation of CoreOS kubernetes failing to connect on fresh installation of CoreOS kubernetes kubernetes

kubernetes failing to connect on fresh installation of CoreOS


Kubernetes development is moving insanely fast right now so this could be out of date by tomorrow. With that in mind, the kubernetes folks recommend following one of their official installation guides. The best advice would be to start over fresh with one of the new installation guides but there are a few tips that I have learned doing this myself.

The first thing to note is that Kubecfg is being deprecated in favor of kubectl. So for future reference if you want to get info about a pod you would run something like:

./kubectl get pods.

With kubectl you will also need to set an env variable so kubectl know how to talk to the apiserver:

KUBERNETES_MASTER=http://IPADDRESS:8080.

The easiest way to debug exactly what is going on if you are using CoreOS is to tail the logs for the service you are interested in. So if you have a kube-apiserver unit you can look at what's goin on by running:

journalctl -f -u kube-apiserver

from the node that is running the apiserver. If that service isn't running, which may be the case, you can start it with:

systemctl start kube-apiserver


On CoreOS you should look at the logs using journalctl.

For example, if you wish to see etcd logs, which Kubernetes relies on for storing the state of it's minions, run journalctl _COMM=etcd, and similarly journalctl _COMM=apiserver will show you the logs from the apiserver, one of key components in Kubernetes.

You also get last few log entries if you run systemctl status apiserver.


Based on errordevelopers advice, my recent installation ran against a similar problem.

Using systemctl status apiserver and sudo systemctl start apiserver I managed to get the environment up and running again.