k8m
一款轻量级、跨平台的 Mini Kubernetes AI Dashboard,支持大模型+智能体+MCP(支持设置操作权限),集成多集群管理、智能分析、实时异常检测等功能,支持多架构并可单文件部署,助力高效集群管理与运维优化。
GitHub Stars
640
User Rating
Not Rated
Favorites
0
Views
163
Forks
105
Issues
15
Installation
Difficulty
IntermediateEstimated Time
10-20 minutes
Requirements
Go: 1.16以上Kubernetes: 1.18以上Installation
Installation
Prerequisites
Go: 1.16 or higher
Kubernetes: 1.18 or higher
Installation Steps
1. Clone the Repository
bash
git clone https://github.com/weibaohui/k8m.git
cd k8m
2. Download the Latest Version
bash
curl -LO https://github.com/weibaohui/k8m/releases/latest/download/k8m
chmod +x k8m
3. Start the Server
bash
./k8m
4. Access via Browser
Visit [http://127.0.0.1:3618](http://127.0.0.1:3618) and use the default login credentials.Troubleshooting
Issue: Server won't start Solution: Check the version of Go and reinstall dependencies.Configuration
Configuration
Basic Configuration
Example Configuration File
json
{
"mcpServers": {
"k8m": {
"command": "./k8m",
"args": [],
"env": {
"K8S_CONFIG": "/path/to/kubeconfig"
}
}
}
}
Advanced Configuration
Security Settings
Set an administrator password and enable two-factor authentication.
Store API keys in environment variables or secure configuration files.
Performance Tuning
Configure timeout values and limit concurrent executions.
Examples
Examples
Basic Usage
Running from Command Line
bash
./k8m --enable-temp-admin --admin-username admin --admin-password admin123
Example of API Call
javascript
const { MCPClient } = require('@modelcontextprotocol/client');
const client = new MCPClient();
await client.connect();
const result = await client.callTool('toolName', {
parameter1: 'value1',
parameter2: 'value2'
});
console.log(result);
Use Cases
Streamline monitoring and management of Kubernetes clusters using AI.
Manage multiple Kubernetes clusters centrally with different permissions for users.
Directly manipulate files within pods to simplify routine operational tasks.
View pod logs in real-time to quickly identify issues.