SkaleSafe — Kubernetes Autoscaling Demystified

Kelvin Shamy
5 min readFeb 9, 2023
The SkaleSafe logo, a fish in a shield.

In this article we introduce SkaleSafe, an open source developer tool for visualizing Kubernetes autoscaling metrics. With that said, to fully appreciate the utility of this tool, it may be instructive to first elucidate what Kubernetes is, why it is so useful, and just how powerful its horizontal autoscaling functionality is within the context of deploying and managing large scale applications.

If you are already well-versed in microservice design architecture, Kubernetes and horizontal autoscaling, feel free to skip ahead to the section entitled ‘introducing SkaleSafe’.

Kubernetes — The Gold Standard for Application Deployment

A comprehensive deep-dive into the many facets of Kubernetes, or K8s, is well beyond the scope of this article; Volumes could be, have been, and will surely continue to be written about this technology. However, put succinctly for our purposes here, K8s is a container orchestration system — a tool for automating the deployment and management of software. It essentially allows DevOps teams to create a K8s cluster, wherein they can deploy containerized applications and configure them such that they make live adjustments as the conditions facing them change. Think automatically restarting some part of the application that has crashed, or increasing/decreasing the computing resources available to a server in response to fluctuations in user traffic (we will revisit this concept later).

Given its vast utility, it is not hard to see why Kubernetes has become the gold standard for application deployment.

K8s and microservices applications

While deploying with Kubernetes has its upsides when working with applications across a breadth of architecture styles, where K8s really shines is in the deployment of applications that follow a microservice design architecture pattern.

So what is a microservice architecture pattern?

In contrast to a traditional monolithic architecture consisting of a single unit of software that encompasses the entirety of an application’s functionality, a microservice architecture is comprised of various units of software (AKA services) that exist independently of one another and yet work together in tandem to achieve a shared purpose.

A comparison of the structures of Monolithic and Microservices architecture

Horizontal autoscaling at a glance

There are myriad ways in which K8s dovetails nicely with microservice applications. Among the most compelling is its Horizontal Pod Autoscaler. This feature can dynamically create additional instances of a service to increase application capacity as needed. Conversely, it can also remove instances when they are no longer needed, for greater efficiency. To top it all off, it is able to ensure that workloads are evenly distributed across all currently running instances of a service through a process called load balancing.

Horizontal autoscaling is typically triggered in response to changes in CPU usage and/or memory consumption (though custom configurations vary). This allows companies with applications deployed on cloud platforms to only pay for the resources they use, while also ensuring that additional resources are readily available in the event of a spike in user traffic.

While horizontal autoscaling has become a pillar of large scale microservice application deployment, its implementation is not without its fair share of challenges. Horizontal pod autoscaler configuration is intricate and can quickly become convoluted for even the most savvy of devops engineers. Moreover, due to the automated nature of autoscaling, its functionality is largely executed within a black box, making it difficult at times to ascertain whether an application is truly scaling up or down in an optimal way. Suboptimal downscaling costs companies vital computing resources and therefore money, whereas faulty upscaling can cause applications to be less performant or worse, to crash. Enter SkaleSafe.

Introducing SkaleSafe

Introducing SkaleSafe, an interactive open source Kubernetes metrics visualization tool with a focus on horizontal autoscaling performance. With built-in integration of Prometheus monitoring toolkit, KubeView K8s interface and Grafana data-visualization platform, SkaleSafe scrapes detailed metrics from Kubernetes clusters and transforms them into a powerful suite of elegant and easy-to-understand graphs and displays thus shining a light onto the inner workings of K8s autoscaling architecture.

SkaleSafe simplifies the monitoring of Kubernetes clusters by grouping visualizations into subcategories as they relate to different aspects of K8s functionality. Let’s take a closer look.

Features:

Scaling Metrics

The Scaling Metrics tab serves the user a battery of graphs and data points derived from autoscaling metrics such as pod start rate and duration, number of available and total replicas, and the K8s PLEG (Pod Lifecycle Event Generator), providing incisive insight into the performance of a cluster’s autoscaling architecture, both in its current state and over time.

A gif showing SkaleSafe’s Scaling Metrics tab

Cluster Health

The Cluster Health tab visualizes an assortment of broader metrics, including CPU and Memory utilization vs configured limits, disk space usage and network requests transmitted and received, which together paint a picture of the cluster’s overall performance.

A gif showing SkaleSafe’s Cluster Health tab

KubeView

The KubeView tab provides the user with an interactive visual overview of all Kubernetes Objects currently deployed across namespaces, showing their respective relationships to one another via an easy-to-understand user interface.

A gif showing SkaleSafe’s KubeView tab

Alerts

The Alerts tab tracks activity regarding Prometheus alerts that have been configured for this cluster, distinguishing between alerts received, active alerts, and alerts silenced

A gif showing SkaleSafe’s Alerting Metrics tab

In Conclusion

Thank you for your interest in SkaleSafe. This tool was created for you, the developer community. That said, we look forward to continuing to expand upon ScaleSafe’s functionality. To that end, our team welcomes all suggestions on how the application might better serve our users. Please visit our GitHub for more information and feel free to reach out to our core development team with any feedback.

SkaleSafe | GitHub

Leonardo Brian Campos | LinkedIn | GitHub

Daniel Doody | LinkedIn | GitHub

Bethany Mattern | LinkedIn | GitHub

Kelvin Shamy | LinkedIn | GitHub

Sang Rea Han | LinkedIn | GitHub

--

--