This project is a Kubernetes Deployment Visualizer that provides a graphical representation of the organization of pods, services, and deployments within a Kubernetes cluster. It integrates with live clusters using the Kubernetes API or kubectl to fetch real-time data.
The project is divided into two main parts: the backend and the frontend.
The backend is built using Node.js and Express. It handles API requests to interact with the Kubernetes cluster.
- src/app.js: Entry point for the backend application. Sets up the Express server and middleware.
- src/routes/k8sRoutes.js: Defines routes for fetching information about Kubernetes resources.
- src/services/k8sService.js: Contains logic for interacting with the Kubernetes API.
- package.json: Configuration file for the backend application.
The frontend is built using React and D3.js (or React Flow). It visualizes the Kubernetes resources in an interactive manner.
- public/index.html: Main HTML file for the React application.
- src/components/ClusterView.jsx: Component that visualizes the overall cluster state.
- src/components/PodView.jsx: Component that displays detailed information about individual pods.
- src/App.jsx: Main React component that sets up routing and renders the application layout.
- src/index.js: Entry point for the React application.
- src/styles/App.css: CSS styles for the frontend application.
- package.json: Configuration file for the frontend application.
- Navigate to the
backenddirectory. - Install dependencies:
npm install - Start the backend server:
npm start
- Navigate to the
frontenddirectory. - Install dependencies:
npm install - Start the frontend application:
npm start
Once both the backend and frontend are running, you can access the Kubernetes Deployment Visualizer in your web browser. The application will connect to your Kubernetes cluster and display the current state of your resources.
- Integration with live clusters using
kubectlor the Kubernetes API for real-time updates. - Interactive visualizations using D3.js or React Flow to enhance user experience.
Feel free to contribute to this project by submitting issues or pull requests. Your feedback and contributions are welcome!