Cloud Native 7 min read

Crane-scheduler: Kubernetes Scheduling Optimization Based on Real Workload

Crane‑scheduler improves Kubernetes efficiency by collecting real‑time node metrics via Prometheus, annotating nodes, and applying configurable predicates and weighted priorities—plus a hot‑value mechanism—to balance load, cut waste, and prevent hotspots, delivering more stable, better‑utilized clusters.

Tencent Cloud Developer
Tencent Cloud Developer
Tencent Cloud Developer
Crane-scheduler: Kubernetes Scheduling Optimization Based on Real Workload

Crane-scheduler addresses the gap between Kubernetes' resource requests and actual usage, which causes uneven cluster load. The article explains how this leads to resource waste and instability, then introduces Crane-scheduler as a solution that uses real-time node metrics for scheduling.

Architecture: Crane-scheduler relies on Node-exporter and Prometheus to collect and aggregate node metrics. It consists of Scheduler-Controller (periodically pulls metrics and annotates nodes) and Scheduler (uses annotations for filtering and scoring).

Scheduling Strategies: Users can configure predicates (threshold-based filtering) and priorities (weighted scoring based on metrics). The system also includes a hot-value mechanism to prevent scheduling hotspots.

Scheduler-Controller periodically pulls metrics from Prometheus and annotates nodes with CPU/memory usage averages and maximums.

Predicates filter nodes where metrics exceed thresholds (e.g., CPU usage >65%).

Priorities assign weights to metrics (e.g., CPU usage max avg 1h: weight 0.5) and calculate scores.

Hot-value tracks recent scheduling frequency to adjust scores.

Benefits: Balances load, reduces waste, and maintains stability. Case studies show improved resource utilization in public and internal clusters.

KubernetesResource optimizationSchedulingcloud nativeCost efficiency
Tencent Cloud Developer
Written by

Tencent Cloud Developer

Official Tencent Cloud community account that brings together developers, shares practical tech insights, and fosters an influential tech exchange community.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.