Skip to content

visualize some necessary info of your kubernetes cluster easily in real time with less overhead built using GO and React

Notifications You must be signed in to change notification settings

Saumya40-codes/k8s-visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes Cluster Visualizer

This project provides a tool for visualizing Kubernetes clusters using Golang for the backend and React for the frontend. It allows users to easily view and understand their Kubernetes cluster configuration.

Features

  • Visualize Kubernetes cluster configuration
  • Out-of-cluster configuration support
  • In-cluster configuration
  • Backend powered by Golang
  • Frontend built with React

Overview

image

image

Prerequisites

  • Go (version 1.22.3 or higher)
  • Node.js (version >= v20.10.0 or higher)
  • npm (version >= 10.8 or higher)
  • Access to a Kubernetes cluster

Installation

  1. Clone the repository:

    git clone https://github.com/Saumya40-codes/k8s-visualizer
    cd k8s-cluster-visualizer
    
  2. Install backend dependencies:

    go mod tidy
    
  3. Install frontend dependencies:

    cd ui
    npm install
    

Usage (Out-of-cluster configuration)

  1. Set the KUBECONFIG env variable

    EXPORT KUBECONFIG='path/to/your/.kube/config`
    
  2. Start the backend server:

    go run main.go
    
  3. In a new terminal, start the frontend development server.

    cd ui
    npm run dev
    
  4. Open your browser and navigate to http://localhost:5173 (or the appropriate port)

  5. Use the interface to visualize your Kubernetes cluster

Usage (In-cluster configuration)

  1. Run the following command
kubectl create -f https://raw.githubusercontent.com/Saumya40-codes/k8s-visualizer/refs/heads/master/yamls/all-in-one.yaml
  • Wait for respective deployments to get ready, you can check using

    kubectl get pods
    
  1. Port forwarding (Or you can expose the service running (see: kubectl get svc) you can see kubectl get pods to see pod full tag/name of your pod

    kubectl port-forward k8s-visualizer-frontend-yourrespectivetag 5173:5173
    

    and

    kubectl port-forward k8s-visualizer-backend-yourrespectivetag 8080:8080
    
  2. Open your browser and navigate to http://localhost:5173 (or the appropriate port)

  3. Use the interface to visualize your Kubernetes cluster

About

visualize some necessary info of your kubernetes cluster easily in real time with less overhead built using GO and React

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published