This implementation rely on the fact that the agent is able to auto-discover other agents. Deployed as a
global service inside a Swarm cluster, each agent automatically discover the other agents in the cluster and register them.
Portainer can then be plugged on any of these agents (either by using DNS-SRV records ensure high-availability or using the URL to a specific agent). To do so, a user would just need to create a new endpoint and add the IP:PORT to one of the agents in the cluster (or use the Swarm service name to be able to use DNS-SRV records).
The agent would be responsible for the following:
- Aggregate the data of multiple nodes (list the containers available in the cluster for example)
- Redirect requests to specific nodes in the cluster (inspect a container on a specific node or create a new secret via a cluster manager for example)