Skip to content

🖥️ k8s-reporter Dashboard Guide

This comprehensive guide walks you through using the k8s-reporter dashboard, covering all analysis views, navigation features, and best practices for Kubernetes cluster analysis.

Overview

The k8s-reporter dashboard is a Streamlit-based web application that provides interactive visualization and analysis of Kubernetes cluster data exported by k8s-analyzer. It offers 10+ specialized analysis views for comprehensive cluster insights.

Key Features

  • Interactive Web Interface: Modern Streamlit-based dashboard with responsive design
  • 10+ Analysis Views: Specialized dashboards for different aspects of cluster analysis
  • Label-based Governance: Comprehensive labeling analysis and application discovery
  • Health Status Monitoring: Visual indicators for healthy, warning, and error states
  • Advanced Visualizations: Interactive Plotly charts, network graphs, and data tables
  • Export Capabilities: Download reports and analysis data in JSON/CSV formats
  • Dynamic Filtering: Real-time filtering by namespace, resource type, and health status

Getting Started

Installation

# Install k8s-reporter
cd k8s-reporter
uv sync

# Or install with pip
pip install -e .

Launch the Dashboard

# Launch with database file
k8s-reporter --database cluster-analysis.db

# Launch on custom port
k8s-reporter --port 8080

# Launch for remote access
k8s-reporter --host 0.0.0.0 --port 8501

Upload Database via Web Interface

  1. Launch k8s-reporter without specifying a database
  2. Use the file uploader in the sidebar
  3. Upload your .db file generated by k8s-analyzer
  4. Select analysis views from the sidebar navigation

Dashboard Navigation

  • 📁 Database Upload: Upload SQLite database files
  • 🎯 View Selection: Choose from 10+ analysis views
  • 🏷️ Namespace Filter: Filter data by specific namespaces
  • 📦 Resource Type Filter: Focus on specific Kubernetes resources
  • ❤️ Health Status Filter: Show only healthy, warning, or error resources

Main Content Area

  • 📊 Interactive Charts: Plotly visualizations with hover tooltips
  • 📋 Data Tables: Sortable, searchable resource listings
  • 📈 Metrics Cards: Key performance indicators and statistics
  • 🔗 Navigation: Seamless movement between related views

Analysis Views Guide

1. 🏠 Cluster Overview

Purpose: High-level cluster health and resource distribution

Key Metrics: - Total resources, health ratio, namespaces, issues - Resource distribution pie chart - Health status breakdown - Top namespaces table

Use Cases: - Daily cluster health checks - Executive reporting - Quick cluster assessment

2. 🔒 Security Analysis

Purpose: Security posture evaluation and RBAC analysis

Key Features: - Service accounts and role bindings count - Privileged pods detection - Security context analysis - Automated security recommendations

Use Cases: - Security audits - Compliance assessments - Vulnerability identification

3. 🏷️ Namespace Analysis

Purpose: Per-namespace resource breakdown and analysis

Key Features: - Namespace selection dropdown - Resource type distribution - Health status per namespace - Top resources identification

Use Cases: - Application team reporting - Namespace-specific troubleshooting - Resource allocation analysis

4. ❤️ Health Dashboard

Purpose: Resource health monitoring and issue tracking

Key Features: - Health ratio calculations - Health trends over time (if historical data available) - Resources with issues tables - Health distribution charts

Use Cases: - Operational monitoring - Issue identification - Health trend analysis

5. 🔗 Relationship Analysis

Purpose: Resource dependency mapping and relationship visualization

Key Features: - Relationship types distribution - Source-target matrix visualization - Searchable relationships table - Network graph visualization

Use Cases: - Architecture understanding - Impact analysis - Dependency mapping

6. 🏗️ Namespace Components

Purpose: Detailed component analysis within namespaces

Key Features: - Component distribution charts - Relationship network graphs - Critical and orphaned components identification - Dependency chain analysis

Use Cases: - Microservices architecture analysis - Component health assessment - Dependency troubleshooting

7. ⚡ Resource Efficiency

Purpose: Pod resource optimization and efficiency analysis

Key Features: - Resource coverage percentage - Pods without requests/limits identification - Severity classification (critical, high, medium, low) - Detailed remediation recommendations

Use Cases: - Resource optimization - Cost management - Performance tuning

8. 💾 Storage Analysis

Purpose: Storage consumption and volume management

Key Features: - Total capacity and utilization metrics - Storage class distribution - Volume status analysis - Per-namespace storage breakdown

Use Cases: - Capacity planning - Storage optimization - Cost allocation

9. ⏰ Temporal Analysis

Purpose: Resource lifecycle and creation pattern analysis

Key Features: - Resource creation timeline - Age distribution analysis - Creation patterns by day of week - Stale resource identification

Use Cases: - Lifecycle management - Cleanup planning - Growth analysis

10. 🏷️ Label Analysis (New in v0.7.9)

Purpose: Comprehensive labeling governance and quality assessment

Key Features: - Label coverage metrics and quality scoring - Common labels identification - Multi-label resource analysis - Orphaned resource detection

Use Cases: - Labeling governance - Compliance assessments - Resource organization

11. 🚀 Application View (New in v0.7.9)

Purpose: Application-centric cluster analysis using Kubernetes labels

Key Features: - Automatic application discovery - Application health and resource breakdowns - Orphaned resource identification - Labeling recommendations - Detailed per-application analysis

Use Cases: - Application portfolio management - Resource governance - Development team reporting

Advanced Features

Interactive Visualizations

  • Hover Tooltips: Detailed information on chart hover
  • Clickable Legends: Toggle data series visibility
  • Zoom and Pan: Navigate large datasets easily
  • Responsive Design: Works on desktop, tablet, and mobile

Export Capabilities

  • JSON Reports: Complete analysis data export
  • CSV Data: Tabular data for spreadsheet analysis
  • Filtered Exports: Export only filtered/selected data
  • Application Reports: Specialized reports for governance

Search and Filtering

  • Global Search: Find resources across all views
  • Multi-level Filtering: Combine namespace, type, and health filters
  • Real-time Updates: Filters apply instantly
  • Persistent Filters: Maintain filters across view changes

Configuration Options

Environment Variables

# Pre-load database
export K8S_REPORTER_DATABASE="/path/to/cluster.db"

# Custom port and host
export STREAMLIT_SERVER_PORT="8501"
export STREAMLIT_SERVER_ADDRESS="localhost"

CLI Options

k8s-reporter --help

Options:
  --port         Port to run the app (default: 8501)
  --host         Host to bind the app (default: localhost)
  --database     Path to SQLite database file
  --headless     Run without opening browser
  --debug        Enable debug logging

Best Practices

Daily Operations

  1. Start with Overview: Begin with Cluster Overview for high-level health
  2. Check Health Dashboard: Identify any immediate issues
  3. Review Security: Regular security posture assessments
  4. Monitor Efficiency: Weekly resource efficiency reviews

Weekly Reviews

  1. Temporal Analysis: Review resource creation patterns
  2. Storage Analysis: Monitor capacity and growth trends
  3. Label Analysis: Assess labeling governance
  4. Application View: Review application portfolio health

Monthly Assessments

  1. Comprehensive Security Review: Deep dive into security analysis
  2. Resource Optimization: Identify optimization opportunities
  3. Relationship Analysis: Review architecture and dependencies
  4. Export Reports: Generate monthly governance reports

Troubleshooting

Common Issues

Dashboard Won't Load

# Check if port is available
netstat -an | grep 8501

# Use different port
k8s-reporter --port 8080

Database Upload Fails

# Verify database file
sqlite3 cluster.db ".tables"

# Check file permissions
ls -la cluster.db

Performance Issues

# Enable debug mode
k8s-reporter --debug

# Use smaller dataset for testing
k8s-analyzer export-directory-sqlite ./small-test cluster-test.db

Chart Rendering Problems

  • Clear browser cache
  • Try different browser
  • Check browser console for JavaScript errors
  • Ensure latest Plotly version

Getting Help

  • Documentation: Check the complete documentation
  • GitHub Issues: Report bugs and feature requests
  • Community: Join discussions and get support
  • Examples: Review example usage and configurations

Tips for Effective Analysis

  • Use browser bookmarks for frequently accessed views
  • Leverage browser back/forward for quick navigation
  • Keep multiple browser tabs open for comparison

Data Interpretation

  • Focus on trends rather than absolute numbers
  • Use filtering to isolate specific issues
  • Compare data across different time periods
  • Export data for detailed offline analysis

Reporting

  • Use screenshots for visual reports
  • Export filtered data for stakeholder sharing
  • Create regular reporting schedules
  • Combine multiple views for comprehensive analysis

This guide provides everything you need to effectively use the k8s-reporter dashboard for comprehensive Kubernetes cluster analysis and governance.