af4bbe9b15a084a96ea4907094e2958f29d384b1
K3S Management
A modern web-based management interface for K3S Kubernetes clusters built with SvelteKit 5.
Features
- 🔐 Authentication - Secure login system
- 🖥️ Cluster Management - Create and manage K3S clusters
- 📦 Node Management - Add and monitor cluster nodes
- 🔑 SSH Configuration - Manage SSH connections to nodes
- ⚙️ Settings - Configure system preferences
- 💾 Data Export/Import - Backup and restore configurations
Tech Stack
- SvelteKit 5 - Frontend framework with modern runes syntax
- TailwindCSS 4 - Utility-first CSS framework
- TypeScript - Type-safe development
- K3sup - Backend tool for K3S cluster installation (planned)
Getting Started
Prerequisites
- Node.js 18+ or Bun
- A modern web browser
Installation
- Clone the repository
- Install dependencies:
bun install
# or
npm install
- Start the development server:
bun run dev
# or
npm run dev
- Open your browser and navigate to
http://localhost:5173
Default Login Credentials
- Username:
admin - Password:
admin
⚠️ Security Note: Change these credentials in production!
Project Structure
k3s-management/
├── src/
│ ├── lib/
│ │ └── stores/ # Svelte stores for state management
│ │ ├── auth.svelte.ts
│ │ └── clusters.svelte.ts
│ ├── routes/
│ │ ├── +page.svelte # Login page
│ │ └── admin/ # Admin dashboard
│ │ ├── +layout.svelte
│ │ ├── +page.svelte
│ │ ├── clusters/
│ │ ├── nodes/
│ │ ├── ssh/
│ │ └── settings/
│ └── app.css # Global styles
└── package.json
Usage
Creating a Cluster
- Navigate to the Clusters page
- Click Create Cluster
- Fill in cluster information:
- Cluster name and description
- K3S version
- Server node SSH details (host, port, username, password)
- Node IP address
- Click Create Cluster
Adding Nodes
- Navigate to the Nodes page
- Click Add Node
- Select the target cluster
- Configure node details:
- Node name and role (Server/Agent)
- SSH connection details
- Node IP address
- Click Add Node
Managing SSH Configurations
- Navigate to SSH Configurations
- View all SSH connections
- Test connections to verify connectivity
- Copy connection strings for manual SSH access
Settings
- Configure K3sup version
- Enable/disable automatic backups
- Set up notifications
- Export/import data
- Clear all data
Development
Building for Production
bun run build
# or
npm run build
Preview Production Build
bun run preview
# or
npm run preview
Code Formatting
bun run format
# or
npm run format
Linting
bun run lint
# or
npm run lint
Roadmap
- Implement actual K3sup backend integration
- Add real SSH key-based authentication
- Real-time cluster status monitoring
- Cluster logs viewer
- Multi-user support with roles
- API endpoints for external integrations
- Kubernetes resources management
- Helm charts deployment
- Cluster backup and restore
- Monitoring and alerting
Security Considerations
⚠️ Important: This is a development/demo version. For production use:
- Implement proper authentication (JWT, OAuth, etc.)
- Use SSH keys instead of passwords
- Encrypt sensitive data
- Use HTTPS
- Implement rate limiting
- Add CSRF protection
- Validate all inputs
- Use environment variables for configuration
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT
Acknowledgments
- Built with SvelteKit
- Styled with TailwindCSS
- Powered by K3sup
- Icons from Heroicons
Description
Languages
Svelte
91.7%
TypeScript
5.1%
JavaScript
2.1%
Dockerfile
0.8%
HTML
0.3%