kubernetes controller or scheduler HA

2/6/2017

In kubernetes, controller-manager and scheduler achieve HA by creating an Endpoint, for example:

kube-scheduler Endpoint

As far as i know, LeaderElection just create an endpoint without service. However, in endpoint controller, it will delete endpoints without corresponding services, which will cause leader transition.

endpoints_controller source code

I dont't know if i miss something important or the leader election exists bugs.

-- Bling
high-availability
kubernetes

1 Answer

4/6/2017

You may understand the code wrong, here I assume you've already have knowledge about list-watch mechanism in APIServer.

In NewEndpointController, you can see that EndpointController only care about pod and service resource, only when these two kind of resource change(add/update/delete) will be caught by EndpointController. So create a standalone endpoint(this event) will not be captured by EndpointController, and will only remind kube-proxy create related network config in host.

-- Crazykev
Source: StackOverflow