# TOSCA-Based and Federation-Aware Cloud Orchestration for Kubernetes Container Platform
## 3 Federation Frameworks of Containerized Services  
### Overall Architecture  
Figure 2 shows a sample cloud service scenario devised to highlight the problem that our research work in this article seeks to resolve. First, the cloud service is established using container clusters using the configuration and system specification provided by the administrator and user. These system specifications are by standards, default configuration, and user-defined customization. Then, the clusters are deployed across the cloud provider's different service areas (such as Northeast Asia, North America, and West Europe in our use case scenario) and federated to increase the reliability and responsiveness of the cloud service. The objective of the TOSCA-based cloud orchestration system proposed in this research article is to automate this entire orchestration process using a cloud orchestration tool and to support its operation monitoring in the future as well. Therefore, the primary focus of our system design was to support the following functions:  
1. Automation of the distribution and federation of container clusters by defining the Kubernetes cluster federation in the TOSCA description of the application, receiving the information of the Kubernetes clusters, and executing \"join Kubernetes federation\". 2. Automation of the service status management by defining Kubernetes horizontal pod auto-scaler (HPA) information with regard to the TOSCA description of the cloud application and enabling its operation in the cloud orchestration tool. 3. Enabling the identification and monitoring of the entire service topology of the application by allowing the cloud orchestration tool to access the information of the Kubernetes components. Figure 3 outlines the proposed system architecture that realizes these three functions. The orchestration system receives relevant component services and pod information through YAML scripts. The orchestration system is based on TOSCA standard descriptions, which makes it easy to receive the Kubernetes clusters information, and eventually, join them to the federation. The HPA (horizontal pod autoscaler) scales up and scales down the number of pods in the entire Kubernetes federation in an automatic manner. The monitoring agent plug-in allows the orchestration system to monitor the status of each component at all times. Key component interactions, especially between the Orchestration System and Kubernetes Federation, are marked as (i), (ii), and (iii) in the figure. Actions and interactions performed by each of the interfaces are discussed below. 1. Defining a Kubernetes federation according to the TOSCA standard makes it easy to communicate Kubernetes clusters information and join them to the federation. Input TOSCA descriptions contain new federation and cluster components that are backed up by the corresponding federation and cluster types we introduced in Kubernetes plugins. For an association between a cluster and its intended federation, Kubernetes plugin module first makes a connection to the federation and then executes \"kuberfed join\" command to make the cluster join the federation. 2. The system also supports Kubernetes HPA, which auto-scales the number of pods across the entire Kubernetes federation. The HPA component type is defined to be associated with the K8s API Mapper so that AutoscalingV1 Api requests can be sent to the Kubernetes Federation. V1 HorizontalPodAutoscaler and V1 DeleteOptionsinputs payloads are transported for HPA creation and deletion, respectively. * Furthermore, the monitoring agent allows the system to monitor the status of the Kubernetes components. A monitoring agent installed on each pod allows direct monitoring access to individual pods. Shell Runner module is introduced to our system architecture to support the installation of the Diamond monitoring program on the pod via the kubectl shell command execution. Figure 3: Proposed cloud orchestration system architecture for container cluster federation.