## 8 Conclusions  
Monolithic controllers have several drawbacks concerning scalability and reliability. In most cases, these architectures do not meet the requirements of fault tolerance and rapid adaptability, which are imposed by networked microgrids. This proposal's most significant contribution was the property to dynamically reconfigure control flows based on a microservices architecture and the automatic deployment of microservices instances.  
Using a bare-metal Kubernetes cluster on a Raspberry pi and deploying distributed microservices allowed us to improve the reality of a distributed energy control system. Microservices testbeds demonstrated the SDN controllers' rapid deployment, portability, high availability and resiliency to application failures.  
The Kubernetes orchestrator provided good scalability of the communication system, as well as improved the fault tolerance and replication capacity. This is due to the high fault tolerance, capable of managing and distributing the load between microservices. From a comparative perspective, this proposal significantly improves failure recovery time and resilience concerning communications devices.  
The API REST microservice topology allowed the splitting of the SDN controller's core functionalities into small, well-defined functions. In all test case scenarios, reliability showed excellent behavior. Furthermore, the portability of all the nodes in the topology is possible due to the Docker containers. The ability to exchange control information between DGs over an SDN network allows them to regulate the system's response and reach a steady state more quickly. The results show that to increase the resilience of the network, more sophisticated control strategies and highly available programmable communications networks are required. Finally, the monitoring architecture allows the export of logs in real-time and detects failures through notification software.  
Conceptualization, R.P.; Investigation, R.P., M.R. and Y.S.; Methodology, C.R.B. and P.W.; Project administration, M.R.; Software, R.P., M.R. and Y.S.; Supervision, C.R.B. and P.W.; Validation, R.P., M.R., C.R.B. and P.W.; visualization, R.P. and Y.S.; Writing--original draft, R.P., M.R. and C.R.B. All authors have read and agreed to the published version of the manuscript.  
This research was funded by the National Doctorate Scholarship CONICYT 2019; ANID/ ATE220023 Project; FONDECYT Regular Research Project 1220556; CLIMAT AMSUD 21001 and FONDAP SERC Chile 15110019.  
Not applicable.  
The authors express their gratitude to the University of Talca and the University of Nottingham for their support during this research period. Furthermore, we would like to thank the \(\mu\)_Onos_ Team for the guidelines provided to complete this manuscript.  
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.  
The following abbreviations are used in this manuscript:  
\begin{tabular}{l l} API & Application Programming Interface \\ SDN & Software-defined networking \\ DGs & Distributed generators \\ NMG & Networked microgrids \\ PLECS & The Simulation Platform for Power Electronic Systems \\ \(\mu\)_ONOS_ & Microservices Open Network Operating System \\ \end{tabular}