KOSMOS is an autoscaling solution, developed at the Politecnico di Milano, for Kubernetes. Pods are individually controlled by control-theoretical planners that manage container resources on-the-fly (vertical scaling). A dedicated component is in charge of handling resource contention scenarios among containers deployed in the same node (a physical or virtual machine). Finally, at the cluster-level a heuristic-based controller is in charge of the horizontal scaling of each application.
The controllers are freely inspired from sample-controller
- Kubernetes with KEP 1287.
- Kubectl.
Install Kosmos CRDs:
kubectl apply -f config/crd/bases
Install RBACs:
kubectl apply -f config/permissions
kubectl apply -f examples/benchmark/system-autoscaler
By deploying examples/benchmark/system-autoscaler
, 4 controllers will be run: MetricsExposer
, PodAutoscaler
, PodReplicaUpdater
, and PodScaleController
.
Since the API code generator used in hack/update-codegen.sh was not designed to work with Go modules, it is mandatory to recreate the entire module path in order to make the code generation work.
This gives you two options:
- Create the folders
github.com/deib-polimi
and clone this repository in any location of your filesystem. - Clone the repository inside the
GOPATH
directory.
In the end there is no choice other than to preserve the module hierarchy.
If you use this code for evidential learning as part of your project or paper, please cite the following work:
@article{baresi2021kosmos,
title={{KOSMOS:} Vertical and Horizontal Resource Autoscaling for Kubernetes},
author={Baresi, Luciano and Hu, Davide Yi Xian and Quattrocchi, Giovanni and Terracciano, Luca},
journal={ICSOC},
volume={13121},
pages={821--829},
year={2021}
}