Reputation: 1729
i have a kubernetes installation that works fine, currently with one api-server. (version 1.0)
but when i try to start a second api-server (version 1.2alpha), on a different computer with the same config, it seems to work (i can access it with curl), but i get these error-messages every 10seconds:
controller.go:290] Resetting endpoints for master service "kubernetes" to...'
(the line is longer, i removed the remaining parts because i am not sure how much of it contains private info)
the api-server is started like this:
kube-apiserver --logtostderr=true --v=0 --etcd_servers=something --address=something --allow_privileged=false --service-cluster-ip-range=something
(i replaced the correct values with 'something')
starting the second one with version-1.0 does not show these messages, so it might be an issue of version-mismatch, but i am not sure.
Upvotes: 0
Views: 2299
Reputation: 399
kube-apiserver
needs to know how many apiservers are in the cluster. You must provide the --apiserver-count=X
flag to every member of the cluster, where X is the number of apiservers in the cluster. If X is too small, apiservers will fight over the endpoints for the kubernetes service (as you observe). If X is too large, then wrong values will linger in the endpoints for the service and some percentage of client requests to the Kubernetes API from within the cluster will not connect to a running apiserver.
In the future, we will probably make apiservers negotiate this value amongst themselves, but for now you need to set the flag correctly.
Upvotes: 3