Web-based Kubernetes dashboard inspired by Lens. Manage your cluster from any browser.
988
A web-based Kubernetes management dashboard similar to Lens, designed to run inside your Kubernetes cluster and be accessible via a web browser.
# Install dependencies
npm run install-all
# Start development servers (backend + frontend)
npm run dev
The application will be available at:
# Build the Docker image
docker build -t kube-lens-web:latest .
# Run with Docker (mount your kubeconfig)
docker run -p 3001:3001 -v ~/.kube:/home/nodeapp/.kube:ro kube-lens-web:latest
# Build and push the image to your registry
docker build -t your-registry/kube-lens-web:latest .
docker push your-registry/kube-lens-web:latest
# Update the image in k8s/deployment.yaml
# Then deploy using kubectl
kubectl apply -k k8s/
# Or apply individually
kubectl apply -f k8s/namespace.yaml
kubectl apply -f k8s/rbac.yaml
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/service.yaml
kubectl apply -f k8s/ingress.yaml
Via NodePort:
# Access via NodePort (default: 30080)
http://<node-ip>:30080
Via Port Forward:
kubectl port-forward -n kube-lens-web svc/kube-lens-web 8080:80
# Access at http://localhost:8080
Via Ingress:
# Add to /etc/hosts
<ingress-ip> kube-lens.local
# Access at http://kube-lens.local
┌─────────────────────────────────────────────────────┐
│ Browser │
└─────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────┐
│ Kube Lens Web Pod │
│ ┌────────────────────────────────────────────────┐ │
│ │ React Frontend │ │
│ │ (Static files served by Express) │ │
│ └────────────────────────────────────────────────┘ │
│ ┌────────────────────────────────────────────────┐ │
│ │ Node.js/Express Backend │ │
│ │ (Kubernetes API Client) │ │
│ └────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────┐
│ Kubernetes API Server │
└─────────────────────────────────────────────────────┘
kube-lens-web/
├── client/ # React frontend
│ ├── public/
│ ├── src/
│ │ ├── components/ # Reusable components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API service
│ │ ├── App.js
│ │ ├── theme.js # MUI theme
│ │ └── index.js
│ └── package.json
├── server/ # Node.js backend
│ ├── config/
│ │ └── kubernetes.js # K8s client configuration
│ ├── routes/
│ │ ├── kubernetes.js # K8s resource routes
│ │ ├── metrics.js # Metrics routes
│ │ └── logs.js # Pod logs routes
│ └── index.js # Express server
├── k8s/ # Kubernetes manifests
│ ├── namespace.yaml
│ ├── rbac.yaml
│ ├── deployment.yaml
│ ├── service.yaml
│ ├── ingress.yaml
│ └── kustomization.yaml
├── Dockerfile # Production build
├── Dockerfile.dev # Development build
├── docker-compose.yaml
└── package.json
| Variable | Default | Description |
|---|---|---|
NODE_ENV | development | Environment mode |
PORT | 3001 | Server port |
The application requires the following permissions:
See k8s/rbac.yaml for full permissions list.
Authentication: This basic version doesn't include authentication. Consider adding:
Network Policies: Restrict access to the dashboard namespace
TLS: Enable TLS in the Ingress configuration
RBAC: Customize the ClusterRole permissions based on your needs
server/routes/client/src/pages/client/src/components/Sidebar.js# Build React frontend
npm run build
# Start production server
NODE_ENV=production npm start
MIT License
Contributions are welcome! Please feel free to submit a Pull Request.
Content type
Image
Digest
sha256:39cf7a468…
Size
56.2 MB
Last updated
5 months ago
docker pull udayglobuslive/kube-lens-web