Kubernetes: Fabiana Rossi
Kubernetes: Fabiana Rossi
Kubernetes: Fabiana Rossi
Fabiana Rossi
f.rossi@ing.uniroma2.it
1
FROM MONOLITHIC TO MICROSERVICES
* Jawarneh, I.M.A., Bellavista, P., Bosi, F., Foschini, L., Martuscelli, G., Montanari, R., Palopoli, A.:
Container orchestration engines: A thorough functional and performance comparison.
Fabiana Rossi, SDCC 20/21 4
In Proc. of IEEE ICC 2019. pp. 1–6 (2019)
What Kubernetes is
• Kubernetes is an open source container orchestration engine for
automating deployment, scaling, and management of containerized
application.
• Originally an open source project launched by Google and now part of
the Cloud Native Computing Foundation (CNCF).
• Kubernetes is highly extensible and portable
• it can run in a wide range of environments and be used in conjunction with
other technologies, such as service meshes.
• Kubernetes is considered highly declarative
• Developers and administrators use it to describe how they want a system to
behave, and then Kubernetes executes that desired state in dynamic fashion.
PodTemplate
• DaemonSet: ensures that all (or some) nodes run a copy of a Pod.
• As nodes are added to the cluster, Pods are added to them.
• As nodes are removed from the cluster, those Pods are garbage collected.
• Deleting a DaemonSet will clean up the Pods it created.
• NodePort: Exposes the Service on each Node's IP at a static port (the NodePort).
• A ClusterIP Service, to which the NodePort Service routes, is automatically created.
• To contact the NodePort Service from outside the cluster: <NodeIP>:<NodePort>.
Horizontal Elasticity
To react to workload
variations
scale-in scale-out
Example:
• If currentMetricValue = 200m and desiredMetricValue = 100m, the number of
replicas will be double.
• If currentMetricValue = 50m and desiredMetricValue = 100m, we’ll halve the
number of replicas.
The current stable version, which only includes support for CPU autoscaling, can be found in the autoscaling/v1 API version.
The beta version, which includes support for scaling on memory and custom metrics, can be found in autoscaling/v2beta2.