Kaptn intends to be a secure, production-ready Kubernetes admin dashboard that can observe cluster state, track metrics, generate alerts+actions, render opentelemetry traces of web applications for visualizing issues, and perform safe operational actions. Built with Go backend (client-go + WebSockets) and Astro + React + Shadcn frontend (TypeScript + Tailwind CSS).
- Real-time cluster monitoring - Live updates via WebSockets
- Safe node operations - Cordon, uncordon, and drain with safeguards
- Declarative deployments - Server-side apply with dry-run support
- Modern UI - React + TypeScript + Tailwind CSS + ShadCN with dark mode
- Security-first - RBAC integration, audit logs, rate limiting
- Easy deployment - Helm chart for in-cluster deployment
- Multiple modes - Container deployment or desktop app (Wails2)
- Observability - Integration with prometheus, grafana, and opentelemetry tracing
- Istio Service Mesh - Full support for Istio Service Mesh - VirtualService and Gateways
π§ Under Development π§ Please Note: Kaptn is currently under active development and should be considered pre-alpha software.
Features may be incomplete, and you may encounter bugs or breaking changes. It is not recommended for use in production environments at this time. We appreciate your understanding and welcome any feedback as we work towards a stable release!
Note: These screenshots are outdated. More to come soon.
Current Dashboard
Features live updates via kubernetes informer + websockets.
Edit YAML / Pod Details
Quick / Detailed views for all resources including ability to quick-edit YAML and perform actions.
Cloud Shell Exec
Secure cloudshell to connect to containers/pods via bash or sh.
Resource Page (Services)
Secrets
Manage/Add/Edit secrets securely (RBAC Enforced access) with the secrets page.
API Settings
Cluster Settings
User Settings
There are two ways to provide kaptn with access to your cluster. Either by KUBECONFIG (path added to config.yaml) or incluster
mode. If deployed either way, you must have the proper cluster admin privileges, whether through KUBECONFIG or through a service account created/used when deploying Kaptn.
- Go 1.22+
- Node.js 20+
- Docker (optional)
- K8s cluster (minikube, kind, k3s, doesn't matter)
Kaptn comes with a very useful Makefile
that performs several useful actions such as:
make build
- runsmake frontend
andmake backend
(npm run build onfrontend/
and go build oninternal
)make dev
- builds frontend and backend and launches an npm dev server.make docker
- builds a docker image of Kaptnmake docker-debug
- builds a docker image of kaptn with a shell for troubleshootingmake push
andmake push-debug
- pushes docker image to registry, although you'll need to put your repo in.
Be sure to checkout the rest of the useful tools like clean
, fmt
, test-go
, etc.
-
Clone and setup:
git clone https://github.com/aaronlmathis/kaptn.git cd kaptn
-
Edit config.yaml: Edit config.example.yaml and save it as config.yaml. Choose incluster or kubeconfig mode. If deploying incluster, you can create the docker image and use one of the manifests in
deploy/
to get an idea of how to deploy it. -
Run the application:
make build ./bin/server # Build frontend and backend server. # Launch server. Web portal and API default to :8080 ./bin/server # Available command line options: ./bin/server --version # Show version information ./bin/server --health-check # Perform health check ./bin/server --config config.yaml # Use specific config file
-
Access the dashboard:
I will get around to writing better instructions. You should be able to figure out how to deploy it, but if you have problems, email me ([email protected])
This is probably outdated. But theres a PROJECT_FILES.md
file that gets updated pretty regularly in root.
βββ cmd/server/ # Main application entry point
βββ internal/ # Private Go packages
β βββ api/ # HTTP handlers and routing
β βββ k8s/ # Kubernetes client and operations
β βββ config/ # Configuration management
β βββ logging/ # Structured logging
β βββ version/ # Version information
βββ frontend/ # React frontend application
β βββ src/
β β βββ components/ # React components
β β βββ ...
βββ deploy/ # Deployment manifests
β βββ helm/ # Helm chart
β βββ rbac/ # RBAC examples
βββ .github/workflows/ # CI/CD pipelines
βββ docs/ # Documentation
The application can be configured via environment variables or a config file:
# config.yaml
server:
addr: "0.0.0.0:8080"
base_path: "/"
cors:
allow_origins: ["*"]
allow_methods: ["GET", "POST", "PUT", "DELETE", "OPTIONS"]
security:
# enable one of: "none", "header", "oidc"
auth_mode: "none"
oidc:
issuer: ""
client_id: ""
audience: ""
jwks_url: ""
kubernetes:
mode: "kubeconfig" # or "incluster"
kubeconfig_path: "" # used if mode=kubeconfig, defaults to $KUBECONFIG
namespace_default: "default"
features:
enable_apply: true
enable_nodes_actions: true
enable_overview: true
enable_prometheus_analytics: true
rate_limits:
apply_per_minute: 10
actions_per_minute: 20
logging:
level: "info" # debug, info, warn, error
integrations:
prometheus:
url: "http://prometheus.monitoring.svc:9090"
timeout: "5s"
enabled: true
caching:
overview_ttl: "2s"
analytics_ttl: "60s"
jobs:
persistence_enabled: true
store_path: "./data/jobs"
cleanup_interval: "1h"
max_age: "24h"
Key environment variables:
- `PORT` - Server port (default: 8080)
- `LOG_LEVEL` - Logging level (debug, info, warn, error)
- `KUBECONFIG` - Path to kubeconfig file
- `KAD_CONFIG_PATH` - Path to config file
make help # Show all available targets
make dev # Run in development mode
make build # Build binary and frontend
make test # Run all tests
make lint # Lint code
make fmt # Format code
make clean # Clean build artifacts
make kind-up # Create Kind cluster
make kind-down # Delete Kind cluster
make docker # Without shell
make docker-debug # build docker image with shell
make push # Push image to registry
make push-debug # Push debug image to registry
This project is licensed under the GPL 3.0 license - see the LICENSE file for details.