I have three nodes in my CoreOS cluster running with Kubernetes. I am following this documentation from CoreOS https://coreos.com/kubernetes/docs/latest/deploy-master.html. On my worker node I can see that it is not able to connect with my apiserver:
Failed to list *api.Pod: Get http://138.68.43.202/api/v1/pods?fieldSelector=spec.nodeName%3D138.68.236.47&resourceVersion=0: dial tcp 138.68.43.202:80: getsockopt: connection refused
However, if I try to reach the apiserver from the master node itself I can see it's returning responses:
curl http://127.0.0.1:8080/api/v1/nodes?fieldSelector=metadata.name%3D138.68.236.47&resourceVersion=0
"kind": "NodeList",
"apiVersion": "v1",
"metadata": {
"selfLink": "/api/v1/nodes"
},
"items": null
}
Not sure what is wrong.
It seems looking at the log in /var/log/containers folder gave a hint. It seems the apiserver is listening on 0.0.0. at port 443 and on 127.0.0.1:8080 insecurely. So changing it accordingly in the kubelets help get past this issue. For now.