Kubernetes Monitoring and Management Tool
All-In-One Kubernetes Monitoring tool
KubeSentry is an SPA that allows users to monitor and manage their kubernetes cluster all in one place. While there are other tools in the market, none of the offer the kind of namepace filter and front end pod management that we wanted. So I got together a team to build one our own.
My personal contributions included:
- Setting up and deploying kubernetes with intrumentend microservice applications with Prometheus and a Prometheus CRD (Custom Resource Definition) that would pull the metrcis data off of the microservices to the Prometheus Time-Series database. Also integrated metrics-server to obtain CPU and RAM usage data of kubernetes cluster. One struggle I had was to obtain and provide authorization for the metrics server to access the controle plane API-Server. Ultimately I went with an unsecure TLS connection to bypass the authorization step due to the time constraint of launch.
- Engineering a backend server with Node/Express making use of middlewares to handle multiple RESTful API requests from the frontend. The server was integrated with the Kubernetest API which allowed my server to connect with the kubernetes running locally on my computer. Other middleware functions sending GraphQL queries to the Prometheus Time-series cleaning up the results before sending to the front end.
- Integrating Slack notifications for custom metric thresholds. The alerts is also sent to a spearate logging database that would also show the information on the webapp. Since I was using Kubernetes with DockerDesktop, the cluster was self-contained so I havd to open up a connection to allow it to speak with the host machine to send a post requdst to the database which was hosted on a separate server.
- Generate graphs on front end using React-Charts which offers some more felxivity and design controler over Graphana, but honestly should maybe have used Graphana looking back.
Pod Management & Namespace Filtering
Interactive Graph View of Clusters
Under the Hood
React + Next.js
React and Next.js were chosen for the frontend to meet the project's specific needs. Vue.js lacked TypeScript support and ecosystem maturity, while Angular seemed overly complex. React, with its one-way data binding and component-based structure, combined with Next.js for efficient server-side rendering, provided a clean and organized codebase aligning with the team's expertise.
Node + Express
Node.js was selected for the backend due to its ability to handle multiple asynchronous requests and non-blocking I/O. This ensured responsiveness and scalability. The decision to exclude Java aimed at minimizing complexity and maintaining language consistency with TypeScript in the development stack.
API Query
RESTful API queries were preferred over GraphQL for KubeSentry's focus on constant monitoring and data visualization. We also knew the data model that we were working with so there was not over/under fetching. RESTs simplicity and adherence to the request-response model suited the periodic update requirements of the application.
Back to Projects