In the following scenario, is there a way to determine to which etcd server the Kubernetes-apiserver is communicating with??
- Let's say we have 3 Master nodes with an external load balancer and 3 etcd's that are co-located in the same host with etcd running on Master1 node as a leader.
- When a kubectl command is executed, the external load balancer routes the traffic to one of the 3 Master nodes in a round-robin way.
- Assume that the HTTP request hits the Master3 node.
The question here is, does the kubernetes-apiserver on Master3 node talks to the leader etcd (on Master1 node) to notify about the resource state and then the leader etcd distributes the data with the other two followers?
- Does the kubernetes-apiserver on Master3 node talks to the etcd running on Master3 node about the resource state to store and notifies the etcd leader?
The line from kubernetes-apiserver.service file:
--etcd-servers=https://10.240.0.10:2379,https://10.240.0.11:2379,https://10.240.0.12:2379 seems like every kubenetes-apiserver running on all 3 Master nodes know about all 3 etcd servers.