You are on page 1of 9

Int J Syst Assur Eng Manag

https://doi.org/10.1007/s13198-021-01195-8

ORIGINAL ARTICLE

Artificial intelligence-based Kubernetes container for scheduling


nodes of energy composition
Diaz Jorge-Martinez1 • Shariq Aziz Butt2 • Edeh Michael Onyema3 •
Chinmay Chakraborty4 • Qaisar Shaheen5 • Emiro De-La-Hoz-Franco1 •

Paola Ariza-Colpas1

Received: 12 May 2021 / Revised: 22 June 2021 / Accepted: 11 July 2021


 The Society for Reliability Engineering, Quality and Operations Management (SREQOM), India and The Division of Operation and
Maintenance, Lulea University of Technology, Sweden 2021

Abstract Kubernetes is a portable, extensible, open-source individual terms has been greatly improved by the new
platform for managing containerized workloads and ser- system presented in this study. The KCSS presented in this
vices that facilitates both declarative configuration and study provides multicriteria node selection based on arti-
automation. This study presents Kubernetes Container ficial intelligence in terms of decision making systems
Scheduling Strategy (KCSS) based on Artificial Intelli- thereby giving the scheduler a broad picture of the cloud’s
gence (AI) that can assist in decision making to control the condition and the user’s requirements. AI Scheduler allows
scheduling and shifting of load to nodes. The aim is to users to easily make use of fractional Graphics Processing
improve the container’s schedule requested digitally from Units (GPUs), integer GPUs, and multiple-nodes of GPUs,
users to enhance the efficiency in scheduling and reduce for distributed training on Kubernetes.
cost. The constraints associated with the existing container
scheduling techniques which often assign a node to every Keywords Artificial intelligence  Cloud infrastructure 
new container based on a personal criterion by relying on Scheduling strategy  Multi-criteria scheduler  Automated
scheduling  Kubernetes

& Chinmay Chakraborty


cchakrabarty@bitmesra.ac.in 1 Introduction
Diaz Jorge-Martinez
jdiaz5@cuc.edu.co Artificial Intelligence presents opportunities for data sci-
Shariq Aziz Butt entists to improve the quality of data mining, analysis and
Shariq2315@gmail.com optimization of the quality of their models. The cloud
Edeh Michael Onyema computing field has progressively experienced rapid
michael.edeh@ccu.edu.ng development and a range of virtualization innovations,
Qaisar Shaheen including virtual machines (VMs) and containers that have
qaisar.shaheen2002@gmail.com appeared, each with their specific set of values (Ahmed
Emiro De-La-Hoz-Franco et al. 2015). A container is a low-level OS virtualization
edelahoz@cuc.edu.co methodology which enables a program as well as its
Paola Ariza-Colpas requirements to execute within a source-isolated process
pariza1@cuc.edu.co (Ahmed et al. 2017). Containers have become quite com-
1
Universidad de la Costa CUC, Barranquilla, Colombia
mon in cloud environments due to various benefits
2
including simpler and faster implementation, lower over-
The University of Lahore, Lahore, Pakistan
heads, and optimum management of computing services.
3
Coal City University, Enugu, Nigeria Furthermore, as the philosophy of containerization has
4
Birla Institute of Technology, Mesra, Ranchi, India evolved, the implementation of micro service architecture
5
The Superior University, Lahore, Pakistan and applications is becoming relatively simple. Even so, it

123
Int J Syst Assur Eng Manag

occurs at the price of the implemented applications’ • Reduce the number of running containers.
specificity (Alicherry and Lakshman 2013; Ardagna et al. • Reduce the time it takes to send the user-selected item
2012). Because of portability and configuration, Kuber- towards its container.
netes is a common open source framework which is
designed for all infrastructure and services. It integrates
strategies including automated container optimization and
2 Proposed solution
distribution of specific nodes that are mainly dependent on
physical resource usages and specific threshold values, but
In this study, we presented KCSS, a new Kubernetes
it is commonly used among enterprises and academics.
Container Scheduling Technique for improving container
It is focused on a master–slave design, with the master
schedule efficiency in a mixed cloud computing environ-
and slaves communicating via a kubelet interface. The
ment. The objective is to address the complex issues that
unique feature of KCSS is how it includes a multi-criteria
organizations face implementing Kubernetes in a cloud
scheduling system for optimizing the allocation of a series
infrastructure and accepting online containers requested
of containers requested remotely through consumers. The
from its consumers, choosing the appropriate node to
purpose is to minimize the make span (the amount of time
manage every requested container based on multiple
it takes to organize and implement each container) as well
parameters relating to the user’s desire to decrease time to
as the average power efficiency. We suggest that hybrid
launch and the cloud provider’s willingness to reduce
parameters relevant to the environment for cloud comput-
energy usage. The presented solution suggests a load-bal-
ing and the customer must be included in our solution
ancing-based docker container task scheduling (Chinmay
(Ardagna et al. 2012).
and Roy 2012; Chinmay et al. 2011). The idea is that the
The artificial intelligence is playing a very significant
algorithm automatically manages the loading within each
role in scheduling of resources and decision making. For
container within a cluster threshold, ensuring that the
instance, the quality of Service (QoS) can be improved
loading is neither very heavy, neither very minimal for
using Artificial Intelligence (AI). With the advent of new
each container (Zheng et al. 2014; Baccarelli et al. 2015;
technologies and concepts including the Internet of Things
Beloglazov et al. 2012).
(IoT) and Artificial Intelligence, cloud computing became
The following are the key contributions of this work:
intelligent computation. Artificial Intelligence enables IoT
and Cloud nodes intelligent for their workload environment 1. Proposing KCSS as a new Kubernetes Container
and change in real time to support stronger QoS, lower Scheduling Technique.
power usage, and lower infrastructure costs (Sachin et al. 2. Take into account hybrid criteria in the KCSS, such as
2021; Amit et al. 2021, 2020). A scheduling technique for a the condition of the cloud infrastructure and the needs
cloud-based mutable environment, as well as specific of the users.
tasks are required. As a result, meta-heuristic-based cloud 3. In KCSS, find the node that has an equitable balancing
dynamic activity scheduling algorithms including Artificial of conflicting attributes for each container using a
Bee Colony (ABC), Ant Colony Optimization (ACO), and multi-criteria making decision method.
Particle Swarm Optimization (PSO) are preferred (Aroca 4. Integrate KCSS with Go language1 into the Kubernetes
et al. 2016; Elhady and Tawfeek 2015; Gill et al. 2019). system with minimal changes so that it can be used by
The following parameters were taken into account: (1) upcoming Kubernetes versions with ease.
the CPU usage level in every node; (2) the storage usage
Kubernetes is an open-source container improvisation
level of every node; (3) the disc usage level in every node;
tool that is widely used. As shown in Fig. 1, it automates
(4) the power usage within every node; and (5) the total of
the implementation, sizing, and maintenance of container-
operating containers throughout every node.
based applications. It is developed on the pods principle,
The major contribution of this study includes;
And Pod is made up of one or multiple containers that have
• Energy load assessment. been normally co-located, co-scheduled, and run through-
• Issues with load balancing. out the same way (Chen et al. Aug 2015; Chowdhury et al.
• Presented efficient load balancing and scheduling 2009; Cordeschi et al. 2012). As a consequence, these are
technique. all hosted by a virtual machine that already exists. It might
• CPU usage level assessment. be very well deploy on premises or in a public cloud. It
• Increase CPU usage. creates a Kubernetes cluster with a master and a set of
• Increase memory utilization. Kubernetes handlers. Scheduling in Kubernetes is broken
• Increase storage disc usage. down into two processes. The first process includes
• Reduce the power utilization. screening all nodes to eliminate those which may not

123
Int J Syst Assur Eng Manag

1. Increase the number of execution of containers to


accommodate the greatest no of consumers;
2. Reduce the time it takes to process all containers; and.
3. Reduce the amount of power used by all nodes.
The working modeling against the scheduling is defined
by using the 3 variables as like :

; ð2Þmsa ; and ð3Þpa :xa;b


ð1Þxa;b 
1 if when the container a run on nodeb
¼
0 else

here the msa is defining the time for scheduling


and execuation of containera ,
power
here the pa is defining the usage of by the node and
energy
execuation of containera
!
X
c
Max xa;b ; 8b 2 f1; . . .. . .:; ng ^ ð1Þ
a¼1
!
X
c
Max msa ð2Þ
a¼1
Fig. 1 Kubernetes architecture
!
X
c
satisfy the Pod’s criteria. To discover the perfect match to Max pa ð3Þ
the execute a pod, at other process ranking and categorizes a¼1

the lasting nodes applying priority (Dean and Ghemawat 2.1 Principle of the KCSS
2008). The priority is a key/value pair that represents the
priority’s name and the weighing selected from a list of The concept of KCSS is to pick the node that seems to have
options. The preference key function assigns a rating to an excellent balance around hybrid parameters linked to the
every node. Every priority function is given a positive structure of the cloud infrastructure and the consumer
value for each node’s total rating is determined from request for each recently requested container, as shown in
adding all of the weighted ratings together. Kubernetes Fig. 2. The specified node in our framework requires as
chooses the node with the greatest rating after all node follows:
scores have been computed (Dłaz et al. 2016; Fazio et al.
2016). 1. Increase CPU usage.
As shown in Fig. 2 the container request have been 2. Increase memory utilization.
generated by the users. It comes from Kubernetes 3. Increase storage disc usage.
scheduling for containers (KSC) method suggested by us. 4. Reduce the power utilization.
In regard to the KSC, then the resource controller can 5. Reduce the number of running containers.
manage the requests and shifts to the cloud infrastructure as 6. Reduce the time it takes to send the user-selected item
per the requirement and management of the resources to towards its container.
keep and continue the performance of the system (Felter We anticipate the five requirements mentioned above in
et al. 2015). KCSS. Nevertheless, other factors such as the cost of every
The following is a model for the problem analysis other node or the bandwidth length may be used to make
throughout this study. There is no no of nodes that make up the KCSS design more standardized. Each criteria recog-
the cloud infrastructure: node1 ; node2 ; and noden ;. For nized by KCSS is described in the following sections
this, there is a given set of c containers that would be (Guan et al. 2014).
submitted via the users for cloud services such as
container1 ; container2 and containern : The following will
be our tasks:

123
Int J Syst Assur Eng Manag

Fig. 2 Kubernetes scheduling


on each container request

2.2 CPUs ratio As shown in Fig. 3 that container 1 is running on node 1


and container 2 on node 2. In this current situation, con-
The aim of using this method is to identify the node with tainer 1 used 80% CPUs but container 2 used only 20%
the maximum CPU usage ratio, and highest CPU usage rate CPUs. Therefore if we schedule container 1 with node 2 to
for each recently requested container to reduce the number execute as it needs 20% only and node 2 has 80% space
of utilized nodes with limited use of CPUs. Algorithm 1 remaining. Therefore, in this case, container 2 will have no
illustrates that in what ways CPU consumption level is node to execute because node 1 already has 80% resources
calculated by separately a node which makes up the cloud used by container 1. Therefore, to overcome this issue and
platform. make an efficient scheduling, we are going to suggest a

We assume that containers are requested online in our framework as mentioned in Fig. 1.
method. Such that, at time T0 , the scheduler has no idea Assume we have two nodes for following scenario at
how many and when containers are sent for next time T1 . time T0 :

123
Int J Syst Assur Eng Manag

Node1 : CPUsrate ¼ 10andCPUsused ¼ 8; 2.3 Memory usage ratio


Node2 : CPUsrate ¼ 10andCPUsused ¼ 2;
The aim of using such a parameter is to choose the node
Assume at time T0 , a new container (container1) with 2 with the largest memory usage ratio in each recently
CPUs is requested, and at time T0 ? 1, one other container requested container to compress the number of the used
(container2) with 8 CPUs is assigned. nodes in respect of storage for the similar function as
Thus, the measurement of the CPUs usage can be condensing nodes in context of CPUs (Guan et al. 2015).
computed as Algorithm 2 illustrates that the memory usage level of
8 each node in the cloud computing is measured.
Node1 : CPUsrate ¼  100 ¼ 80%:
10
2
Node2 : CPUsrate ¼  100 ¼ 20%:
10

123
Int J Syst Assur Eng Manag

configuration is shown in Fig. 4. The most important


CloudSim Plus package, as well as the categories they
include, are briefly listed below:
• Distribution: classes which allow the computation API
to generate pseudorandom values based on a variety of
numerical distributions. It could be considered for
developers who want to create their own experiments.
• Network: classes for building data centers, network
architecture, and simulating network traffic.
CloudSim Plus can only be used to calculate the energy
usage within each node in our scenario. Whenever a con-
sumer submits for a new container, the CloudSim Plus
system is invoked to calculate the overall energy usage by
each node. The value generated through the CloudSim Plus
Fig. 3 Schedule centered on CPUs consumption level system is again allocated to the KCSS’s energy usage
criteria as shown in Fig. 4.
2.4 Disk usage ratio
2.6 No of working containers within node/s
The aim of using such a parameter is to choose the node
with the largest disc consumption ratio, and highest disc
The aim of the whole criteria is to find the node balancing
consumption level in each recently requested container to
the loading with respect of functioning containers by each
consolidate the numbers of the used nodes with aspects of
newly container which is requested. The goal is to provide
disk for the same purpose as condensing nodes with -
the node with the fewest working containers first prefer-
aspects of CPUs and memory (Ariza-Colpas et al. 2021).
ence. We suggest balancing the load within nodes in our
Algorithm 3 illustrates that the disc usage ratio is
solution to ensure that whenever any node fails, we lose
measured by each node which makes up the cloud
fewer containers since no of the containers is evenly dis-
platform.
tributed across nodes. Only this criterion (the number of
functional containers) is being utilized for the primary
2.5 Power usage
container schedule approach in the Docker Swarmkit
(Kaewkasi et al. 2017; Rimal et al. 2021).
The aim of applying such a criterion is to choose the node
with the lowest energy usage in each newly requested
2.7 Time it takes for the user-selected image to be
container to lessen the cost that uses nodes. The cloud
transmitted to its container
infrastructure is used to compute power usage. In our case,
the cloud technology used for the analysis mentioned lacks
The aim of such criteria is to find the node which consumes
an energy usage monitoring method. We used the Cloud-
the least amount of time when removing artifacts from a
Sim Plus as just a controller to calculate energy across
remote repository to a node’s specific database by each
every node to reduce this issue (Guerrero et al. 2018).
newly requested container (lowest period transferring of
CloudSim Plus is a framework and collection of tools
image). To meet this requirement, we have to choose the
that enables users to simulate a cloud environment at a low
node that contains the necessary objects in its central
cost. It can model and simulate a wide range of cloud
database with each newly requested container. Let us
services, including IaaS and SaaS layers. It enables the
presume, we get two nodes, node1 and node2, and node1
development of simulated scenarios through the study,
has two images (image A and image b), in its remote
evaluation, and verification of algorithms across a wide
directory. Even so, node2’s local database only contains
range of applications (Jiang et al. 2013).
image c. Whenever a consumer sends a new container
CloudSim Plus allows you to define the properties of
(container x) that requires image c, node2 is by far the most
various cloud provider organizations, including: (1) phys-
suitable node for execution container x since node2 can run
ical resources like storage systems, virtual machines and
the container x explicitly despite having to remove image c
networking resources (2) logical resources including stor-
from the server (López-Torres et al. 2019; Shaheen et al.
age devices, networking protocols, and software; and (3)
2020; Onyema 2019).
virtual server, which incorporates components like virtual
machines (VMs). The CloudSim plus API package

123
Int J Syst Assur Eng Manag

Fig. 4 CloudSim working

Fig. 5 Ccontainer
implementation of node 1 with
Kubernetes approach

3 Results and discussion However, in the case of node 2, the average container has
more loads for scheduling and managing the system. We
As mentioned in Fig. 3 we have adopted a 2 node based result conclude that the large container with large resources
scenarios for energy scheduling and saving. The Fig. 5 have more capacity to manage the network and enhance the
depicts the working of node 1 for the scheduling of the performance of the network but need more time to get the
nodes with respect to the proposed scheduling technique. resources and execute. The outcomes of the simulation
While Fig. 6 presented the node 2 implementation results. revealed that the proposed technique using the AI concepts

123
Int J Syst Assur Eng Manag

Fig. 6 Ccontainer
implementation of node 1 with
Kubernetes approach

and designed algorithms are very effective to manage the References


load on container and balancing the energy as well. In this
simulation when a node fails, we suggest that work on the Ahmed E, Gani A, Khan MK, Buyya R, Khan SU (2015) Seamless
application execution in mobile cloud computing: motivation,
fault-tolerance issue. Redundancy of containers, for
taxonomy, and open challenges. J Netw Comput Appl
example, could be used to analyze the fault tolerance issue. 52:154–172
It might suggest that certain assignments are no longer Ahmed E, Naveed A, Gani A, Hamid SHA, Imran M, Guizani M
accessible. Also, Artificial Intelligence would continue to (2017) Process state synchronization for mobility support in
mobile cloud computing. In: IEEE international conference on
improve decision making processes as seen in this study,
communications (ICC), pp. 1–6
particularly as it relates to scheduling, maximization of Alicherry M, Lakshman T (2013) Optimizing data access latencies in
resources and cost reduction in management. cloud systems by intelligent virtual machine placement. IEEE
INFOCOM. pp. 647–655
Amit K, Chinmay C, Wilson J, Kishor A, Chakraborty C, Jeberson W
(2020) A novel fog computing approach for minimization of
4 Conclusion latency in healthcare using machine learning. Int J Interact
Multimedia Artif Intell. https://doi.org/10.9781/ijimai.2020.12.
We presented AI-based KCSS that facilitates robust 004
Amit S, Lalit G, Chinmay C (2021) Improvement of system
scheduling and decision making. It has the capacity to
performance in an IT production support environment. Int J
improve the scheduling for containers that consumers send Syst Assur Eng Manag. https://doi.org/10.1007/s13198-021-
online. For each of the requested container, the KCSS 01092-0
algorithm selects the most suitable node with a combina- Ardagna D, Panicucci B, Trubian M, Zhang L (2012) Energy-aware
autonomic resource allocation in multitier virtualized environ-
tion of dynamic requirements concerning the consumer
ments. IEEE Trans Serv Comput 5(1):2–19
requirement and the status of the cloud computing. In our Ariza-Colpas PP, Ayala-Mantilla CE, Shaheen Q, Piñeres-Melo MA,
method, we assume that every container assignment is Villate-Daza DA, Morales-Ortega RC, De-la-Hoz-Franco E,
good. In the event that one node fails, we suggest that work Sanchez-Moreno H, Aziz BS, Afzal M (2021) SISME, estuarine
monitoring system based on IOT and machine learning for the
on the fault tolerance issue. Redundancy of containers, for
detection of salt wedge in aquifers: case study of the Magdalena
example, could be used to analyze the fault tolerance issue. River estuary. Sensors 21(7):2374
It might suggest that certain assignments are no longer Aroca JA, Anta AF, Mosteiro MA, Thraves C, Wang L (2016) Power-
accessible. In our future work, we will focus on the efficient assignment of virtual machines to physical machines.
Future Generat Comput Syst 54:82–94
implementation of the presented KCSS using the multiuse
Baccarelli E, Amendola D, Cordeschi N (2015) Minimum-energy
node scenario and also evaluate the outcomes. bandwidth management for qos live migration of virtual
machines. Comput Network 93:1–22
Beloglazov A, Abawajy J, Buyya R (2012) Energy-aware resource
Funding There was no outside funding or grants received that allocation heuristics for efficient management of data centers for
assisted in this study. cloud computing. Future Generat Comput Syst 28(5):755–768
Chen X, Li C, Jiang Y (2015) Optimization model and algorithm for
Declarations energy efficient virtual node embedding. IEEE Commun Lett
19(8):1327–1330
Conflict of interest The authors declare that they have no conflict of
interest.

123
Int J Syst Assur Eng Manag

Chinmay C, Roy R, Pathak S, Chakrabarti S (2011) An optimal Guerrero C, Lera I, Juiz C (2018) Genetic algorithm for multi-
probabilistic traffic engineering scheme for heterogeneous objective optimization of container allocation in cloud architec-
networks. CIIT Int J Fuzzy Syst 3(2):35–39 ture. J Grid Comput 16(1):113–135
Chinmay C, Roy R (2012) Markov decision process based optimal Jiang J, Lu J, Zhang G, Long G (2013) Optimal cloud resource auto-
gateway selection algorithm. Int J Syst Algorithms Appl 48–52 scaling for web applications. In: International symposium on
Chowdhury N, Rahman M, Boutaba R (2009) Virtual network cluster, cloud and grid computing (CCGrid), pp. 58–65
embedding with coordinated node and link mapping. In: IEEE Kaewkasi C, Chuenmuneewong K (2017) Improvement of container
INFOCOM, pp. 783–791 scheduling for docker using ant colony optimization. In: 9th
Cordeschi N, Patriarca T, Baccarelli E (2012) Stochastic traffic International conference on knowledge and smart technology
engineering for realtime applications over wireless networks. (KST), pp. 254–259
J Netw Comput Appl 35(2):681–694 López-Torres S, López-Torres H, Rocha-Rocha J, Butt SA, Tariq MI,
Dean J, Ghemawat S (2008) Mapreduce: simplified data processing Collazos-Morales C, Piñeres-Espitia G (2019) IoT monitoring of
on large clusters. Commun ACM 51(1):107–113 water consumption for irrigation systems using SEMMA
Dłaz M, Martłn C, Rubio B (2016) State-of-the-art, challenges, and methodology. In: International conference on intelligent human
open issues in the integration of internet of things and cloud computer interaction (pp. 222–234). Springer, Cham
computing. J Netw Comput Appl 67:99–117 Onyema EM (2019) Integration of emerging technologies in teaching
Elhady GF, Tawfeek MA (2015) A comparative study into swarm and learning process in Nigeria: the challenges. Central Asian J
intelligence algorithms for dynamic tasks scheduling in cloud Math Theory Comput Sci 1(1):35–39
computing. In: 2015 IEEE Seventh international conference on Rimal Y, Pandit P, Gocchait S, Butt SA, Obaid AJ (1804) (2021)
intelligent computing and information systems (ICICIS) (pp. Hyperparameter determines the best learning curve on single,
362–369). IEEE multi-layer and deep neural network of student grade prediction
Fazio M, Celesti A, Ranjan R, Liu C, Chen L, Villari M (2016) Open of Pokhara University Nepal. J Phys Conf Ser 1:012054
issues in scheduling microservices in the cloud. IEEE Cloud Sachin D, Chinmay C, Jaroslav F, Rashmi G, Arun KR, Subhendu KP
Comput 3(5):81–88 (2021) SSII: Secured and high-quality Steganography using
Felter W, Ferreira A, Rajamony R, Rubio J, (2015) An updated Intelligent hybrid optimization algorithms for IoT. IEEE Access
performance comparison of virtual machines and linux contain- 9:1–16. https://doi.org/10.1109/ACCESS.2021.3089357
ers. In: 2015 IEEE International symposium on performance Shaheen Q, Shiraz M, Hashmi MU, Mahmood D, Akhtar R (2020) A
analysis of systems and software (ISPASS), pp. 171–172 lightweight location-aware fog framework (LAFF) for QoS in
Gill SS, Tuli S, Xu M, Singh I, Singh KV, Lindsay D, Tuli S, internet of things paradigm. Mobile Inf Syst. https://doi.org/10.
Smirnova D, Singh M, Jain U, Pervaiz H (2019) Transformative 1155/2020/8871976
effects of IoT, blockchain and artificial intelligence on cloud Zheng Y, Cai L, Huang S, WangZ (2014) VM scheduling strategies
computing: evolution, vision, trends and open challenges. based on artificial intelligence in Cloud Testing. In: 15th IEEE/
Internet Things 8:100118 ACIS international conference on software engineering, artificial
Guan X, Choi BY, Song S (2015) Energy efficient virtual network intelligence, networking and parallel/distributed computing
embedding for green dcs using dc topology and future migration. (SNPD) (pp. 1–7). IEEE
Comput Commun 69:50–59
Guan X, Choi BY, Song S (2014) Topology and migration-aware Publisher’s Note Springer Nature remains neutral with regard to
energy efficient virtual network embedding for green dcs. In: jurisdictional claims in published maps and institutional affiliations.
23rd International conference on computer communication and
networks (ICCCN). IEEE, pp. 1–8

123

You might also like