A lightweight Kubernetes health monitor and architecture visualizer. Made to observe a Kubernetes cluster externally to provide an alternative method to the potential data-skewing and unnecessary resource usage of internal monitoring.

27
6
JavaScript

Logo

JavaScript
TypeScript
React
Node
Express
Docker
Kubernetes
MongoDB
HTML
CSS
D3.js
Jest
Electron
Webpack

Podz is a Kubernetes cluster visualizer for developers to see the metrics of their cluster.
Find out more at podz.site!

Table of Contents

Features:

Demo
  • Podz, an open-source Kubernetes dev tool, is designed to assist developers in visualizing the architecture of their Kubernetes clusters
  • Our web-based GUI enables users of any operating system running a local Kubernetes cluster to effortlessly showcase and visualize their cluster
  • With a single click, our platform easily retrieves, stores, and presents comprehensive cluster architecture along with health metrics for each node, pod, container, and service.
  • You can view previous metrics with the use of snapshots.
  • Included is an example project for users to test and explore Podz, allowing them to try out its features firsthand.

Getting Started

Prequisites:

  • Docker Desktop (https://www.docker.com/products/docker-desktop/)
  • kubectl (https://kubernetes.io/docs/tasks/tools/)
  • Minikube (optional) (https://minikube.sigs.k8s.io/docs/start/).

Podz displays only user-made Kubernetes components and avoids the initial namespaces except ā€˜defaultā€™ (ā€˜kube-node-leaseā€™, ā€˜kube-publicā€™, ā€˜kube-systemā€™ are all hidden). If you need example projects, we have provided some in the examples section.

Using Minikube:

For testing purposes Podz, we highly recommend the usage of Minikube, which uses a minimal local Kubernetes cluster.
To use Minikube with Podz, start Minikube with this command:

minikube start --extra-config apiserver.cors-allowed-origins=["http://*ā€]

What this command does is start up minikube and prevent CORS blocking the connection between the Kubernetes API Server and the Podz website.
Next, you will need to expose the Kubernetes API Server through proxying for HTTP requests, to do this run the command:

kubectl proxy --port=<number>;

This can be any port of your choice, so long as you change the Podz websiteā€™s port to match it.

Using Standalone Kubernetes:

For standalone Kubernetes, first disable CORS blocking of [http://] requests in the Kuberenetes API Serverā€™s configuration.
Next, run the command:

kubectl proxy --port=<number>

This can be any port of your choice, so long as you change the Podz websiteā€™s port to match it.

Conecting a database:

Currently, Podz is able to be connected to a MongoDb database to store snapshots of the cluster health and architecture at given points of time. To connect a database, copy and paste your MongoDb connection link into the field on the ā€œdemoā€ page. Next enter the port that you are proxying and confirm.

Creating and loading snapshots:

To create a snapshot, simply to click the ā€˜Take Snasphotā€™ button. To load snapshots, select a time range with the calendar component, and then click the ā€˜Load Snapshotā€™ button. The button will open a dropdown with all snapshots taken within that range of time, ordered by time. Finally, click one of the options and the snapshot will load a previous version of the cluster.

Examples

Setting up minikube

While you are following the steps, you may encounter an error mentioning about default not being found. You can run this command to fix it:

docker context use default

For testing purposes Podz, we highly recommend the usage of Minikube, which uses a minimal local Kubernetes cluster. To use Minikube with Podz, start Minikube with this command:

minikube start

What the following command does is start up minikube and prevent CORS blocking the connection between the Kubernetes API Server and the Podz website.

minikube start --extra-config apiserver.cors-allowed-origins=["http://*ā€]

In the test-project folder, you can use those project examples to store in your containers. Next, cd to the test project folder and run the command:

docker-compose build

Now, you have 3 containers set up and you should be able to see 3 images in your Docker desktop!

After that is done, check if Minikube is created and started up with this command:

kubectl get all

Next, you need to load the images into Minikube. To do that, run this command:

minikube image load <image name:version>

At the moment, Minikube does not load images with the newest version of Docker. As of now, please download Docker version 24.0.7

image name needs to be replaced by the name of the image and version needs to be the tag of the image. Check Docker Desktop to find the image name and tags.

Now, you need to apply all .yaml files to kubectl by running this command:

kubectl apply -f <.yml file name>

Next, you will need to expose the Kubernetes API Server through proxying for HTTP requests, to do this run the command:

kubectl proxy --port=<number>

This can be any port of your choice, so long as you change the Podz websiteā€™s port to match it.

Roadmap

  • Fully converting to TypeScript
  • Testings for frontend
  • Loading clusters in the correct position like a binary search tree
  • Notification alerts
  • Live reloading of cluster
  • More metrics like CPU, memory, etc.
  • Visualizer for Docker containers

Contributions

The open-source community is awesome because of contributors like you. Your contributions are invaluable!

If you have a suggestion, fork the repo and make a pull request. You can also open an issue to discuss your idea. And, donā€™t forget to give the project a star! Thanks!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Founders