  Containers are standalone, self-contained units that package software and its
dependencies together. They offer lightweight performance isolation, fast and
flexible deployment, and fine-grained resource sharing. They have gained
popularity in better application management and deployment in recent years and
are being widely used by organizations to deploy their increasingly diverse
workloads such as web services, big data, and IoT in either proprietary
clusters or cloud data centres. This has led to the emergence of container
orchestration platforms, which are designed to manage the deployment of
containerized applications in large-scale clusters. The majority of these
platforms are tailored to optimize the scheduling of containers on a
fixed-sized private cluster but are not enabled to autoscale the size of the
cluster nor to consider features specific to public cloud environments. In this
work, we propose a comprehensive container resource management approach that
has three different objectives. The first one is to optimize the initial
placement of containers by efficiently scheduling them on existing resources.
The second one is to autoscale the number of resources at runtime based on the
current cluster's workload. The third one is a rescheduling mechanism to
further support the efficient use of resources by consolidating applications
into fewer VMs when possible. Our algorithms are implemented as a
plugin-scheduler for Kubernetes platform. We evaluated our framework and the
effectiveness of the proposed algorithms on an Australian national cloud
infrastructure. Our experiments demonstrate that considerable cost savings can
be achieved by dynamically managing the cluster size and placement of
applications. We find that our proposed approaches are capable of reducing the
cost by 58% when compared to the default Kubernetes scheduler.
