This message was deleted.
# fleet
a
This message was deleted.
w
m
Thanks but still api server flow is not clear for multiple control node
w
May be you can try to ask same question in #general or specific channel, so that someone will answer your question quickly...
m
Thanks I have asked it already but not received any replies
q
@melodic-account-62504 to which master node in the downstream cluster the request goes is really decided by the low level layers of the networking stack that implements the tunnel connection between the cattle-cluster-agen on each node and the Rancher Management Server. As you may see here: https://github.com/rancher/rancher/blob/release/v2.7/pkg/tunnelserver/peermanager.go one of the agents acts as a leader so that's the one that will handle the request through the proxied connection by Rancher. That covers the communication from Rancher to one of the downstream nodes (the leader). Then the connection is the standard one and the API call will be sent to which ever IP is defined as the
APIEndpoint
. You can check which the actual APIEndpoint in the target downstream cluster with this command:
kubectl get services -n default -o wide
You'll see a service called kubernetes and the Cluster-IP defined there will be the final IP that will be used to redirect the Kubernetes API command that was initially issued through the Rancher proxied connection. If you want to know which agent processed a specific request you can use the logs with something like this:
Copy code
kubectl -n cattle-system logs -l app=cattle-cluster-agent
Please let me know if it's more clear now.
m
@quick-sandwich-76600 thanks for the answer. Sure let me check this.