Skip to main content
Kubernetes Dashboard integrates with metrics-server to provide real-time insights into cluster resource utilization. This guide covers how to view and interpret metrics for nodes, pods, and other resources.

Overview

Dashboard uses the dashboard-metrics-scraper sidecar to collect and store metrics data, providing:
  • CPU and memory usage graphs
  • Historical sparklines in list views
  • Resource utilization trends
  • Per-pod and per-node metrics
Metrics collection requires metrics-server to be running in your cluster. The metrics-scraper is deployed by default with Kubernetes Dashboard.

Prerequisites

Installing metrics-server

Verify metrics-server is running:
If the command fails, install metrics-server:
Verify installation:

Dashboard Metrics Scraper

The metrics scraper is automatically deployed with Dashboard. It:
  • Queries the Metrics API every 60 seconds
  • Stores data points in a SQLite database
  • Serves metrics to the Dashboard frontend
  • Maintains historical data for sparklines and graphs

Metrics Architecture

The metrics flow:

Metrics Data Structure

The scraper stores metrics in a structured format (modules/metrics-scraper/pkg/api/dashboard/types.go:28-75):

Database Schema

Metrics are stored in two tables: Pods Table:
Nodes Table:

Viewing Node Metrics

Access node metrics at ClusterNodes.

Node Metrics Display

CPU Usage

Shows CPU utilization in millicores and percentage

Memory Usage

Displays memory consumption in bytes and percentage

Pod Count

Number of pods running on the node

Allocation

Resource requests vs. capacity

Node Detail Metrics

Click on a node to view detailed metrics:
  • CPU Chart: Historical CPU usage over time
  • Memory Chart: Historical memory consumption
  • Resource Allocation: Visual breakdown of allocated resources
  • Capacity: Total node capacity vs. requests vs. limits
Hover over chart data points to see exact values and timestamps.

Viewing Pod Metrics

Access pod metrics at WorkloadsPods.

List View Sparklines

The pod list displays mini sparkline graphs showing:
  • Recent CPU usage trend
  • Recent memory usage trend
  • Visual indication of resource consumption patterns

Pod Detail Metrics

The pod detail page shows:
  • Current Usage: Millicores currently consumed
  • Requested: CPU requests defined in pod spec
  • Limited: CPU limits defined in pod spec
  • Usage Graph: Historical CPU consumption

Metrics API Endpoints

The metrics scraper exposes REST endpoints (modules/metrics-scraper/pkg/api/dashboard/dashboard.go:33-36):

Node Metrics

Example:
Response:

Pod Metrics

Example:

Deployment Metrics

View aggregated metrics for deployments at WorkloadsDeployments. The deployment view shows (modules/api/pkg/resource/deployment/list.go:31-44):
Cumulative metrics include:
  • Aggregate CPU usage across all pods
  • Aggregate memory usage across all pods
  • Per-deployment sparklines
  • Resource utilization trends

Metrics Configuration

Customize metrics behavior with Dashboard flags:

API Container Flags

Metrics Scraper Flags

The --metric-client-check-period flag controls health check frequency. Dashboard disables metrics if the scraper becomes unavailable.

Understanding Metrics Data

CPU Metrics

CPU is measured in millicores:
  • 1000m = 1 full CPU core
  • 500m = 0.5 CPU cores
  • 100m = 10% of one CPU core

Memory Metrics

Memory is measured in bytes:
  • 1024 bytes = 1 KiB
  • 1048576 bytes = 1 MiB
  • 1073741824 bytes = 1 GiB

Time Windows

Default retention:
  • Scrape Interval: 60 seconds
  • Retention Period: 15 minutes
  • Database Size: Automatically managed

Troubleshooting

Check metrics-server installation:
Verify metrics-scraper is running:
Check the scrape interval and database health:
Restart the metrics scraper:
Reduce retention period or scrape interval:

Metrics Integration

Dashboard integrates with the metrics ecosystem:

Supported Metrics Providers

metrics-server

Default metrics provider using the Metrics API

Custom Providers

Extend via the integration framework

Integration Framework

The integration framework (modules/api/pkg/integration/manager.go) supports:
  • Multiple metric providers
  • Health checking and failover
  • Provider registration and discovery
Dashboard currently integrates metrics-server by default. The integration framework allows for future expansion to providers like Prometheus or custom metrics APIs.

Best Practices

Check metrics weekly to identify resource bottlenecks and optimize allocations.
Use metrics data to determine realistic CPU and memory limits for your workloads.
Integrate external monitoring systems for alerting on unusual metric patterns.
Use HorizontalPodAutoscaler (HPA) to automatically scale based on CPU/memory metrics.

Next Steps

Viewing Logs

Access container logs for debugging

Integrations

Learn about third-party monitoring integrations