HUB
Sign inSign up

fermdez96/k8dash

By fermdez96

•Updated 2 days ago

Dashboard web ligero para clusters de Kubernetes (binario unico, distroless).

Image
Developer tools
Monitoring & observability
Web analytics
3

7.5K

fermdez96/k8dash repository overview

⁠⎈ K8Dash

🌐 Language / Idioma: 🇬🇧 English⁠ · 🇪🇸 Español⁠

License Image Sponsor


⁠🇬🇧 English

Modern, fast and lightweight web dashboard for Kubernetes clusters.

An alternative to the official Kubernetes Dashboard with an improved interface, real-time metrics and a single binary with no external dependencies, packaged in a tiny Docker image (~15 MB) based on distroless, with no shell and running as a non-root user.

The application's source code is not public: on GitHub and in this image only the precompiled binary is distributed, together with the documentation and example manifests.

⁠📚 Full documentation

The entire installation, configuration and usage guide is published as a browsable website, in English and Spanish:

🌐 Language / IdiomaDocumentation / Documentación
🇬🇧 Englishhttps://k8dash.fermdez.net/docs/en/⁠
🇪🇸 Españolhttps://k8dash.fermdez.net/docs/es/⁠

Highlights / Páginas destacadas:

⁠🚀 Quick start
docker pull fermdez96/k8dash:latest

docker run --rm -p 8080:8080 \
  -v ${HOME}/.kube/config:/kube/config:ro \
  -e KUBECONFIG=/kube/config \
  fermdez96/k8dash:latest

Open your browser at http://localhost:8080⁠.

On Linux you may need --network host if your API server is reachable via 127.0.0.1 (e.g. with kind/minikube).

⁠Pin a specific version
docker pull fermdez96/k8dash:1.36.17
⁠⚙️ Environment variables
VariableDefaultDescription
KUBECONFIG—Path(s) to the kubeconfig. Supports several separated by : (Linux).
K8DASH_ADDR:8080Listen address and port of the HTTP server.
K8DASH_NAMESPACE(auto-detected)Namespace where the authentication Secret k8dash-auth is persisted. In-cluster it is detected from the ServiceAccount.
K8DASH_AUTH_DISABLEDfalseIf true/1, disables authentication. Recovery mechanism if the admin gets locked out.
K8DASH_CORS_ORIGINS*Allowed CORS origins. Accepts * or a comma-separated list. Restrict it to your domain in production.
K8DASH_CORS_METHODSGET, POST, PUT, DELETE, OPTIONSAllowed CORS methods.
K8DASH_CORS_HEADERSContent-Type, AuthorizationAllowed CORS headers.
K8DASH_TRUSTED_PROXIES(loopback + private ranges)Networks whose X-Forwarded-* headers are trusted. Accepts all, none or a CIDR/IP list.
K8DASH_CSRFautoAnti-CSRF protection: auto (browsers only), on (always) or off.
K8DASH_SESSION_TTL12hSession lifetime with automatic renewal. 0 = never expires.
K8DASH_SETUP_TOKEN—If set, the initial authentication setup requires this token.
K8DASH_CSP · K8DASH_FRAME_OPTIONS · K8DASH_HSTS(secure)Security headers (CSP, anti-clickjacking, HSTS). Use off to disable each one.

Full security documentation in k8dash.fermdez.net/docs/en/security⁠ (ES: seguridad⁠) and all variables in configuration⁠ (ES: configuración⁠).

The container exposes port 8080.

⁠☸️ Deployment on Kubernetes

The GitHub repository includes a ready-to-use example manifest (deploy/kubernetes.yaml) with a Namespace, ServiceAccount, least-privilege RBAC, a hardened Deployment (rootless, read-only FS, no capabilities), a Service and an example Ingress:

kubectl apply -f https://raw.githubusercontent.com/FerMdez/K8Dash/main/deploy/kubernetes.yaml
kubectl -n k8dash port-forward svc/k8dash 8080:80

Inside the cluster, K8Dash automatically uses the mounted ServiceAccount: it does not need KUBECONFIG.

⁠✨ Features
  • Cluster overview with real metrics (CPU/memory via metrics-server) and real-time trend charts.
  • Full visualization: Nodes, Pods, Deployments, StatefulSets, DaemonSets, ReplicaSets, Jobs, CronJobs, Services, Ingresses, Endpoints, Gateway API, ConfigMaps, Secrets, PV/PVC, StorageClasses, HPA, ServiceAccounts and Helm v3 releases.
  • Interactive actions: scale, restart, delete, prune ReplicaSets, suspend/trigger CronJobs, edit Secrets, Helm rollback/uninstall.
  • Real-time logs and interactive terminal (kubectl exec) over WebSocket.
  • Live YAML manifest editor for any resource (including CRDs).
  • Built-in port forwarding with an HTTP proxy.
  • Optional authentication (username/password with PBKDF2 —with optional 2FA via TOTP and backup codes— or OIDC/OAuth2) with brute-force protection. If the OIDC provider fails when signing in, a clear error page is shown (in the user's language, with the code highlighted and an option to copy the details).
  • Light/dark theme, installable PWA, responsive design.
⁠🔒 Security
  • K8Dash inherits exactly the permissions of the kubeconfig or ServiceAccount it runs with. Restrict the RBAC in sensitive environments.
  • Hardened image: non-root (UID 65532), no shell or package manager.
  • Do not expose the dashboard directly to the Internet without an authentication layer.

📘 Detailed guide: Security⁠ · Authentication⁠ (ES: Seguridad⁠ · Autenticación⁠).

🚀 Before exposing it in production, follow the complete checklist: Production deployment⁠ (ES: Despliegue en producción⁠).

⁠💖 Support the project

K8Dash is a free project that I develop and maintain in my spare time. If you find it useful and would like to help it keep evolving, you can do so through GitHub Sponsors:

Sponsor on GitHub

Every contribution, however small, is greatly appreciated!

⁠📝 License and author

CC BY-NC-SA · Fernando Méndez Torrubiano (https://fermdez.net/⁠)


⁠🇪🇸 Español

Dashboard web moderno, rápido y ligero para clusters de Kubernetes.

Una alternativa al Kubernetes Dashboard oficial con una interfaz mejorada, métricas en tiempo real y un único binario sin dependencias externas, empaquetado en una imagen Docker minúscula (~15 MB) basada en distroless, sin shell y ejecutada como usuario no-root.

El código fuente de la aplicación no es público: en GitHub y en esta imagen solo se distribuye el binario ya compilado junto con la documentación y los manifiestos de ejemplo.

⁠📚 Documentación completa

Toda la guía de instalación, configuración y uso está publicada como sitio web navegable, en español e inglés:

🌐 Idioma / LanguageDocumentación / Documentation
🇪🇸 Españolhttps://k8dash.fermdez.net/docs/es/⁠
🇬🇧 Englishhttps://k8dash.fermdez.net/docs/en/⁠

Páginas destacadas / Highlights:

⁠🚀 Inicio rápido
docker pull fermdez96/k8dash:latest

docker run --rm -p 8080:8080 \
  -v ${HOME}/.kube/config:/kube/config:ro \
  -e KUBECONFIG=/kube/config \
  fermdez96/k8dash:latest

Abre el navegador en http://localhost:8080⁠.

En Linux puede ser necesario --network host si tu API server es accesible vía 127.0.0.1 (p. ej. con kind/minikube).

⁠Fijar una versión concreta
docker pull fermdez96/k8dash:1.36.17
⁠⚙️ Variables de entorno
VariablePor defectoDescripción
KUBECONFIG—Ruta(s) al kubeconfig. Admite varias separadas por : (Linux).
K8DASH_ADDR:8080Dirección y puerto de escucha del servidor HTTP.
K8DASH_NAMESPACE(autodetectado)Namespace donde persistir el Secret k8dash-auth de la autenticación. In-cluster se detecta del ServiceAccount.
K8DASH_AUTH_DISABLEDfalseSi es true/1, desactiva la autenticación. Mecanismo de recuperación si el admin queda bloqueado.
K8DASH_CORS_ORIGINS*Orígenes permitidos por CORS. Acepta * o una lista separada por comas. Restríngelo a tu dominio en producción.
K8DASH_CORS_METHODSGET, POST, PUT, DELETE, OPTIONSMétodos permitidos por CORS.
K8DASH_CORS_HEADERSContent-Type, AuthorizationCabeceras permitidas por CORS.
K8DASH_TRUSTED_PROXIES(loopback + redes privadas)Redes cuyas cabeceras X-Forwarded-* se aceptan. Admite all, none o una lista de CIDR/IP.
K8DASH_CSRFautoProtección anti-CSRF: auto (solo navegadores), on (siempre) u off.
K8DASH_SESSION_TTL12hDuración de la sesión con renovación automática. 0 = sin expiración.
K8DASH_SETUP_TOKEN—Si se define, la primera configuración de la autenticación exige este token.
K8DASH_CSP · K8DASH_FRAME_OPTIONS · K8DASH_HSTS(seguros)Cabeceras de seguridad (CSP, anti-clickjacking, HSTS). Usa off para desactivar cada una.

Documentación completa de seguridad en k8dash.fermdez.net/docs/es/seguridad⁠ (EN: security⁠) y de todas las variables en configuración⁠ (EN: configuration⁠).

El contenedor expone el puerto 8080.

⁠☸️ Despliegue en Kubernetes

El repositorio de GitHub incluye un manifiesto de ejemplo listo para usar (deploy/kubernetes.yaml) con Namespace, ServiceAccount, RBAC de mínimo privilegio, un Deployment endurecido (rootless, FS de solo lectura, sin capabilities), Service e Ingress de ejemplo:

kubectl apply -f https://raw.githubusercontent.com/FerMdez/K8Dash/main/deploy/kubernetes.yaml
kubectl -n k8dash port-forward svc/k8dash 8080:80

Dentro del cluster, K8Dash usa automáticamente el ServiceAccount montado: no necesita KUBECONFIG.

⁠✨ Características
  • Resumen del cluster con métricas reales (CPU/memoria vía metrics-server) y gráficas de tendencias en tiempo real.
  • Visualización completa: Nodos, Pods, Deployments, StatefulSets, DaemonSets, ReplicaSets, Jobs, CronJobs, Services, Ingresses, Endpoints, Gateway API, ConfigMaps, Secrets, PV/PVC, StorageClasses, HPA, ServiceAccounts y releases de Helm v3.
  • Acciones interactivas: escalar, reiniciar, eliminar, prune de ReplicaSets, suspender/ disparar CronJobs, editar Secrets, rollback/desinstalación de Helm.
  • Logs en tiempo real y terminal interactivo (kubectl exec) vía WebSocket.
  • Editor de manifiestos YAML en tiempo real para cualquier recurso (incl. CRDs).
  • Port forwarding integrado con proxy HTTP.
  • Autenticación opcional (usuario/contraseña con PBKDF2 —con 2FA opcional vía TOTP y códigos de respaldo— u OIDC/OAuth2) con protección contra fuerza bruta. Ante un fallo del proveedor OIDC al iniciar sesión, se muestra una página de error clara (idioma del usuario, código destacado y copia de detalles).
  • Tema claro/oscuro, PWA instalable, diseño responsive.
⁠🔒 Seguridad
  • K8Dash hereda exactamente los permisos del kubeconfig o ServiceAccount con el que se ejecuta. Limita el RBAC en entornos sensibles.
  • Imagen endurecida: no-root (UID 65532), sin shell ni gestor de paquetes.
  • No expongas el dashboard directamente a Internet sin una capa de autenticación.

📘 Guía detallada: Seguridad⁠ · Autenticación⁠ (EN: Security⁠ · Authentication⁠).

🚀 Antes de exponerlo en producción, sigue la lista de comprobación completa: Despliegue en producción⁠ (EN: Production deployment⁠).

⁠💖 Apoya el proyecto

K8Dash es un proyecto gratuito que desarrollo y mantengo en mi tiempo libre. Si te resulta útil y quieres ayudar a que siga evolucionando, puedes hacerlo mediante GitHub Sponsors:

Patrocinar en GitHub

¡Cualquier aportación, por pequeña que sea, es enormemente apreciada!

⁠📝 Licencia y autor

CC BY-NC-SA · Fernando Méndez Torrubiano (https://fermdez.net/⁠)

Tag summary
Recent tags
Content type
Image
Digest
sha256:4c905bed5…
Size
17.3 MB
Last updated
2 days ago
docker pull fermdez96/k8dash:latest