Introducing Palaemon, the Savior of Kubernetes Pods!

Palaemon
6 min readSep 22, 2022
Photo of Palaemon, child-sea god mascot riding a shrimp
Visit our official website!

As containers became increasingly prominent, it gave rise to the need for automatic container deployment, management, scaling, networking, and much more. In other words, a robust container orchestration tool was in demand. Kubernetes, an open-source platform sought to meet those needs with its initial release in 2014 by Google. Although it has revolutionized container orchestration, it brought its own set of challenges such as adding complexity to monitoring the health and resource usage of clusters and the infamous Out of Memory (OOMKill) errors.

These are the problems that Palaemon intends to address, but before we dive into the solution that our platform provides, we must first understand the history and importance of container orchestration.

You can jump straight to learning about Palaemon here!

Let’s start from the early days…

A photo representing bare-metal physical servers

Back when organizations used to run their applications on bare-metal servers, defining and allocating resources was a common problem. Some applications would take up more resources than they’d need, causing others to underperform due to that inflexibility. Running each application on its own physical server would have theoretically solved that problem, but that was an impractical solution for organizations as the cost to maintain multiple, underutilized servers would become quite expensive.

Next up, the Virtual Machine (VM)…

A photo representing virtual servers

Bare-metal servers were limited to running a single server per physical machine. The introduction of VMs allowed organizations to run multiple VMs, separately from each other on a single physical server’s CPU. This decoupling brought increased security and provided the capability to allocate computing limits for each VM, alleviating underutilization issues, avoiding the need to pay for idle servers, and steering clear of potential server crashes due to overconsumption of the host’s resources.

The biggest caveat to the VMs isolated environments was that they still required their own operating system (OS), a heavy expense for computing costs.

Containers, containers, containers…

A photo of containers surrounding an application to represent containerization

Containerization is a type of virtualization where all components of an application are packaged and shipped out as a single container. Containers stray away from the VM infrastructure by allowing applications to share the host’s OS, meaning containers are easier to scale, lightweight, and highly portable across cloud distributions. This is very meaningful as microservices have become the de-facto standard for modular architecture.

Containers solve the infamous issue of “but it works on my machine!” Since developers use various NPM package versions and different run time environments, containerizing ensures code compatibility on different machines during development and production by packaging software into containers that can run reliably in any environment.

The most popular containerization technology is Docker and we recommend learning more about it here!

The need for Container Orchestration…

With the increase in demand for container usage in the microservices landscape, organizations found difficulty managing the extensive network of interconnected, containerized applications. As these apps scaled and deployed across the cloud, ease of automation, maintenance, and monitoring of containers became highly demanded. This led to the inception of container orchestration and eventually, Kubernetes.

Kubernetes to the rescue!

Kubernetes is an open-source system for automating deployment, scaling and management of containerized applications providing organizations with a high degree of reliability, scalability, efficiency, and self-regulation. It’s a framework that allows users to run distributed systems in a very flexible manner with features such as automated rollouts and rollbacks, service load balancing, horizontal scaling, self-healing, configuration management, and much more.

We recommend diving deeper into Kubernetes and understanding the impact of container orchestration here!

A common pattern you may have noticed as we moved from bare-metal servers to container orchestration is that each evolution brought its own set of challenges. Due to Kubernetes lack of native monitoring and robust error tracking, our team aspired to develop Palaemon!

What is Palaemon?

In Greek mythology, Palaemon is a child sea-god who comes to the aid of distressed sailors and is also a genus of shrimp. The product we’ve developed aims to help distressed developers working with Kubernetes!

Palaemon is an Electron based, open-source developer tool for Kubernetes cluster monitoring and error analysis. Kubernetes lacks robust error-tracking for out of memory (OOMKill) errors which occur when the system is in danger of running out of available memory, and when pods, which encapsulate one or more containers, are killed off to prevent a crash. Debugging these errors manually can become quite tricky for developers. In addition, most of the Kubernetes workflow happens under-the-hood, so it’s difficult to visualize the architecture of your cluster.

Our application incorporates the Kubernetes-client JavaScript Library and Kubernetes command line tool (kubectl), so users can diagnose abnormalities by viewing each cluster’s event log history in real-time. We’ve also integrated the use of Prometheus’ metrics server to visualize the cluster’s health and resource usage, generate alerts, and provide data on OOMKill errors.

Prometheus is a monitoring tool that communicates with the Kubernetes API server and scrapes metrics at its endpoints. It has its own powerful query language, PromQL, where users can generate queries for custom metric data. It can be a difficult technology to become familiar with especially with the plethora of options at your disposal.

With our built in PromQL queries and moving the event logs from the command line to a graphical user interface (GUI), it provides quick and easy access to metrics in a visually digestible format. In addition, our analysis feature allows users to obtain snapshots of a defined time interval leading up to OOMKill events. Our main intention was to reduce the time teams would otherwise spend to manually identify and diagnose these errors.

Monitoring clusters and analyzing OOMKill errors should not be overlooked because unwanted crashes could lead to down time, incur unnecessary costs, lead to a bad user experience, and much worse.

Today, Palaemon is officially releasing under the OS Labs non-profit tech accelerator!

Getting Started

Visit palaemon.io for more information or head over to our Github repo! Our documentation will walk you through all the necessary steps involved in the initial setup and how to monitor your first cluster!

The Future

Our team is actively working on packaging the app for distribution on MacOS and will soon strive to support Windows OS! Our team is dedicated to implementing additional features that will provide further benefits, such as generating custom alerts for OOMKill events with specific termination reasons such as “Limit Overcommit” or “Container Limit Reached”, allow for early, graceful termination of pods, automatic reconfiguration of YAML files to adjust memory limits and requests dynamically, and a lightweight, active monitoring mode, which will store a log of historic events and OOMKill data.

Get Involved!

Our team is ecstatic for you to implement Palaemon into your workflow. We strongly believe in the open source community and highly encourage contributions to our product. Any suggestions for improvement are also welcome to improving the future of Palaemon.

Meet and the Palaemon team!

Patrick Hu: Github | LinkedIn

Raivyno (Lenny) Sutrisno: Github | LinkedIn

Si Young Mah: Github | LinkedIn

Thang Thai: Github | LinkedIn

--

--