A comprehensive dashboard for managing OpenKruise workloads including CloneSet, Advanced StatefulSet, Advanced DaemonSet, and more. This project consists of a Go backend API and a Next.js frontend dashboard.
- Workload Management: View and manage CloneSet, Advanced StatefulSet, Advanced DaemonSet workloads
- Rollout Management: Monitor and control application rollouts with pause, resume, undo, and restart capabilities
- Cluster Metrics: Real-time cluster performance and resource monitoring
- Pod Management: Detailed pod information and status for each workload
- Modern UI: Built with Next.js, Tailwind CSS, and shadcn/ui components
Before you begin, ensure you have the following installed:
- Go (version 1.19 or higher)
- Node.js (version 18 or higher)
- npm or yarn
- Kubernetes cluster with OpenKruise installed
- kubectl configured to access your cluster
kruise-dashboard/
├── openkruise-backend/ # Go backend API
│ ├── handlers/ # API handlers
│ ├── repositories/ # Data access layer
│ ├── main.go # Main application entry point
│ ├── go.mod # Go dependencies
│ └── Dockerfile # Container configuration
├── openkruise-dashboard/ # Next.js frontend
│ ├── app/ # Next.js app directory
│ ├── components/ # React components
│ ├── api/ # API client functions
│ └── package.json # Node.js dependencies
└── README.md # This file
git clone <repository-url>
cd kruise-dashboardNavigate to the backend directory and install Go dependencies:
cd openkruise-backend
go mod downloadNavigate to the frontend directory and install Node.js dependencies:
cd openkruise-dashboard
npm installIn one terminal, start the Go backend:
cd openkruise-backend
go run main.goThe backend will start on http://localhost:8080
In another terminal, start the Next.js development server:
cd openkruise-dashboard
npm run devThe frontend will start on http://localhost:3000
cd openkruise-backend
go build -o kruise-dashboard main.go
./kruise-dashboardcd openkruise-dashboard
npm run build
npm startcd openkruise-backend
docker build -t kruise-dashboard-backend .
docker run -p 8080:8080 kruise-dashboard-backendThe backend requires access to your Kubernetes cluster. Ensure your kubeconfig is properly configured:
export KUBECONFIG=/path/to/your/kubeconfig
# or
kubectl config use-context your-cluster-contextThe frontend is configured to connect to the backend at http://localhost:8080. If you change the backend URL, update the API configuration in openkruise-dashboard/api/axiosInstance.ts.
The backend provides the following API endpoints:
GET /api/v1/cluster/metrics- Get cluster performance metrics
GET /api/v1/rollout/:namespace/:name- Get rollout detailsGET /api/v1/rollout/status/:namespace/:name- Get rollout statusGET /api/v1/rollout/history/:namespace/:name- Get rollout historyPOST /api/v1/rollout/pause/:namespace/:name- Pause rolloutPOST /api/v1/rollout/resume/:namespace/:name- Resume rolloutPOST /api/v1/rollout/undo/:namespace/:name- Undo rolloutPOST /api/v1/rollout/restart/:namespace/:name- Restart rolloutPOST /api/v1/rollout/approve/:namespace/:name- Approve rolloutGET /api/v1/rollout/list/:namespace- List all rolloutsGET /api/v1/rollout/active/:namespace- List active rollouts
GET /api/v1/workload/:namespace- List all workloadsGET /api/v1/workload/:namespace/:type/:name- Get specific workloadGET /api/v1/workload/:namespace/:type- List workloads by typeGET /api/v1/workload/:namespace/:type/:name/pods- Get workload pods
- Backend won't start: Ensure you have proper Kubernetes cluster access and OpenKruise is installed
- Frontend can't connect to backend: Check that the backend is running on port 8080 and CORS is properly configured
- Permission denied errors: Verify your kubectl has the necessary permissions to access OpenKruise resources
- Backend logs are displayed in the terminal where you run
go run main.go - Frontend logs are available in the browser's developer console
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Open an issue on GitHub
- Check the OpenKruise documentation
- Review the API documentation above