A Kubernetes-Based Monitoring Platform For Dynamic Cloud Resource Provisioning
A Kubernetes-Based Monitoring Platform For Dynamic Cloud Resource Provisioning
A Kubernetes-Based Monitoring Platform For Dynamic Cloud Resource Provisioning
Abstract—Recently, more and more network operators have One of the most popular solutions for container-based
deployed cloud environment to implement network operations virtualization is using Docker for container packaging with
centers that monitor the status of their large-scale mobile Kubernetes for multihost container management [1]. Kuber-
or wireline networks. Typically, the cloud environment adopts
container-based virtualization that uses Docker for container netes follows the masterslave model, which uses a master to
packaging with Kubernetes for multihost Docker container man- manage Docker containers across multiple Kubernetes nodes
agement. In such a container-based environment, it is important (which are physical or virtual machines). A master and its
that the Kubernetes can dynamically monitor the resource controlled nodes constitute a “Kubernetes cluster.” A developer
requirements and/or usage of the running applications, and can deploy an application in the docker containers via the
then adjust the resource provisioned to the managed containers
accordingly. Currently, Kubernetes provides a naive dynamic assistance of the Kubernetes master. Typically, an application
resource-provisioning mechanism which only considers CPU is divided into one or more tasks executed in one or more
utilization and thus is not effective. This paper aims at developing containers. Each container is generally restricted in terms of
a generic platform to facilitate dynamic resource-provisioning the maximum resource quantity that it can consume. That is to
based on Kubernetes. Our platform contains the following three say, the total amount of resource provisioned to an application
features. First, our platform includes a comprehensive monitoring
mechanism that integrates and provides the relatively complete is the sum of its executed containers’ resource capacity.
system resource utilization and application QoS metrics to the As mentioned above, Kubernetes is a tool which is used
resource-provisioning algorithm to make the better provisioning to manage multiple Docker containers across multiple ma-
strategy. Second, our platform modularizes the operation of chines. In such a container-based environment, it is important
dynamic resource-provisioning operation so that the users can that the Kubernetes can dynamically monitor the resource
easily deploy a newly designed algorithm to replace an existing
one in our platform. Third, the dynamic resource-provisioning requirements and/or usage of the running applications, and
operation in our platform is implemented as a control loop then adjust the resource provisioned to the managed containers
which can consequently be applied to all the running application accordingly, preventing from resource overprovisioning and
following a user-defined time interval without other manual underprovisioning. Typically, the dynamic resource provision-
configuration. ing procedure can be simply separated into four steps: (1) The
Index Terms—Container, Docker, dynamic resource provision-
ing, monitoring, Kubernetes. monitor step: Monitoring the resource usage and limitation of
the entire environment and all of the running applications; (2)
The analyze step: Integrating the monitored data as the input
I. I NTRODUCTION
data of the plan step; (3) The plan step: Using an resource
Recently, more and more network operators (e.g., provisioning algorithm to determine the resource-provisioning
Chunghwa Telcom, Taiwan) have deployed and operated large strategy based on the data generated by the analyze step; and
data centers to manage their businesses. Specifically, the oper- (4) The execute step: Adjusting the resource provisioning to
ators have adopted cloud technologies to implement network all of the running applications according to the strategy in the
operations centers that monitor the status of their large-scale plan step.
mobile or wireline networks, such as computing-resource In Kubernetes, a built-in mechanism has been provided
usage and network response time. for dynamic resource provisioning. In this mechanism, the
In data centers, container-based virtualization, also known users can first set a desired percentage of CPU utilization
as operating system (OS)-level virtualization, is a new virtu- to a specific group of containers that are executed for an
alization technology that divides a server into multiple virtual application. Then, the mechanism executes the four steps that
instances, called containers, by sharing the underlying OS implement dynamic resource provisioning. In particular, in the
kernel. Unlike traditional virtual machines (VMs), lightweight monitor and analyze steps, Kubernetes uses a user-deployed
containers can be started rapidly, which brings about a lower monitoring tool to retrieve the CPU utilization of each running
overhead of computing resources and time in deployment. container; in the plan step, Kubernetes uses its own algorithm
Controller
Fig. 5: Pod Scaler.
Dataaggregator Manager
Report
LinuxOS the application is considered in a light-load period. Therefore,
we decrease one pod for the application. Algorithm 1 can be
Fig. 4: The operation of data aggregator module.
replaced by a newly designed algorithm.
(pods)
0.4
(requests/minute)
50000
1
40000 0.2 provisioning decisions;
30000 0 0
∙ Deployment flexibility. In our platform, we modularize the
11
21
31
41
51
61
71
81
91
1
101
111
20000
10000
0
(minutes) four steps of dynamic resource-provisioning, so that the
AverageCPUutilizationratio Averagememoryutilizationratio
users can easily deploy a newly designed algorithm to
11
21
31
41
51
61
71
81
91
1
101
111
121
currentnumofpod
(minutes)
(b) Resource utilization ratio replace an existing one without affecting other modules;
(a) Arrival rate. and number of pods ∙ Automatic operation. After the users deploy a desired
1.5 4
3
dynamic resource-provisioning algorithm, the resource-
1
(cores)
2
0.5
1 periodically to all the running applications in our platform
0 0
following a user-defined time interval.
1
10
19
28
37
46
55
64
73
82
91
100
109
118
1
9
17
25
33
41
49
57
65
73
81
89
97
105
(minute) 113 (minutes)
TotalCPUusage TotalCPUlimit Totalmemoryusage Totalmemorylimit VII. ACKNOWLEDGMENT
(c) CPU. (d) Memory Shun-Ren Yang’s work was supported in part by Chunghwa
Fig. 6: Experiment: the ticket monster application. Telecom, and by Ministry of Science and Technology
(MOST), R.O.C., under grant numbers MOST 105-2221-
E-007-089, MOST 105-2218-E-009-029. Phone Lin’s work
proposed by Red Hat that was developed based on Docker was supported in part by Chunghwa Telecom, and by
(for container packaging) and Kubernetes (for cluster man- Ministry of Science and Technology (MOST), R.O.C.,
agement). Following the OpenShift Origin requirement, we under grant numbers MOST 106-2923-E-002-005-MY3,
installed CentOS as the OS onto each machine. OpenShift MOST 104-2923-E-002-005-MY3, MOST 103-2221-E-002-
Origin allows us to use the Kubernetes API directly to control 249-MY3, MOST 103-2221-E-002-152-MY3, MOST 105-
all of the Kubernetes components. In our experiment environ- 2627-E-002-001, MOST 105-2622-8-009-008, MOST 105-
ment, we had one master and one node that were both installed 2218-E-002-013, MOST 105-2218-E-009-029, MOST 105-
on the same machine. The software versions are provided 2511-S-002-006-MY2, MOST 106-2221-E-002-031, MOST
in Table I. We invoked the dynamic resource-provisioning 106-2218-E-002-029.
procedure every 1 minute.
R EFERENCES
Over this experiment environment, we deployed a JBoss
sample application, Ticket Monster [10], as the testing appli- [1] Cloud Foundry Foundation. Hope Versus Reality: Con-
cation. Ticket Monster is an online ticketing demo application tainers In 2016. Technical report, June 2016. URL: https:
that users can use to book tickets for concerts, sports games, //www.cloudfoundry.org/learn/2016-container-report/.
and so on. We wrapped the application in a Docker image. [2] Docker. [Online]. Available: https://www.docker.com/.
We then deployed the Ticket Monster into a pod using this [3] Kubernetes. [Online]. Available: http://kubernetes.io/.
image. We used JMeter on another machine to send the HTTP [4] E. Casalicchio and L. Silvestri. Architectures for au-
request to the Ticket Monster application. The duration of the tonomic service management in cloud-based systems.
experiment was 2 hours; during this time, we made the arrival Computers and Communications (ISCC), 2011 IEEE
rate of HTTP requests increase linearly. The Ticket Monster Symposium on, pages 161–166, June 2011.
received nearly 50,000 requests per minute at the end of the [5] Heapster. [Online]. Available: https : / / github . com /
experiment, as shown in Figure 6a. The comparison of the kubernetes/heapster.
CPU utilization ratio, memory utilization ratio, and number of [6] Influxdb. [Online]. Available: https : / / influxdata . com /
executing pods is shown in Figure 6b. Here, we can observe time-series-platform/influxdb/.
that when the memory utilization reached 70%, the system [7] Grafana. [Online]. Available: http://grafana.org/.
increased by one pod. Figures 6c and 6d show the relationship [8] Apache jmeter. [Online]. Available: http : / / jmeter .
of usage quantity and limit quantity of CPU and memory, apache.org/.
respectively. [9] Openshift origin. [Online]. Available: https : / / www .
openshift.org.
VI. C ONCLUSIONS [10] Ticket monster tutorial. [Online]. Available: http : / /
This paper developed a generic platform to facilitate dy- developers.redhat.com/ticket-monster/.
namic resource provisioning over Kubernetes, while resolving