Kubernetes resource requests and limits are notoriously hard to set correctly. Over-provisioning wastes cluster resources and money. Under-provisioning causes throttling and OOM kills. Three tools help optimize pod resource allocation: Descheduler (evicts misconfigured pods), Vertical Pod Autoscaler (adjusts resource requests), and Goldilocks (provides VPA recommendations with a dashboard).
This guide compares their approaches, deployment patterns, and when to use each.
Quick Comparison
| Feature | Descheduler | Vertical Pod Autoscaler (VPA) | Goldilocks |
|---|---|---|---|
| GitHub | kubernetes-sigs/descheduler | kubernetes/autoscaler (VPA subdir) | FairwindsOps/goldilocks |
| Stars | 5,397 | 8,842 (autoscaler repo) | 3,213 |
| Primary Function | Evict poorly scheduled pods | Auto-adjust resource requests | VPA recommendations + UI |
| Action Type | Eviction (reactive) | Patch requests (proactive) | Recommendations (passive) |
| Auto-Apply Changes | ✅ Evicts pods | ✅ Updates requests (auto mode) | ❌ Recommendations only |
| Historical Analysis | ❌ Current state only | ✅ Usage history analysis | ✅ Usage history + visualization |
| Dashboard UI | ❌ CLI/logs only | ❌ CLI/metrics only | ✅ Web UI with recommendations |
| Last Active | 2026-05 | 2026-05 | 2026-04 |
Kubernetes Descheduler: Evicting Misconfigured Pods
The Descheduler finds pods that violate scheduling policies and evicts them so the default scheduler can place them better. It does not schedule pods itself — it only triggers evictions.
Architecture
Descheduler runs as a CronJob or Deployment in the cluster. It periodically analyzes pod placement against strategies and evicts pods that violate policies. The kube-scheduler then re-schedules them.
Installation
| |
| |
Strategy: RemovePodsViolatingNodeAffinity
| |
Strategy: LowNodeUtilization (Consolidation)
| |
Strategy: Pod Lifetime Eviction
| |
Key Strengths
- Rebalancing: Consolidates workloads to reduce node count and save costs
- Anti-affinity enforcement: Ensures pods respect anti-affinity rules after cluster changes
- Topology spread: Maintains even distribution across zones
- Non-disruptive: Respects PDBs and gracefully evicts pods
Vertical Pod Autoscaler (VPA): Automatic Right-Sizing
VPA analyzes historical resource usage and adjusts container resource requests to match actual needs. It operates in three modes: Off (recommendations only), Initial (set on pod creation), and Auto (continuously update).
Installation
| |
VPA Resource Definition
| |
VPA Recommendation Output
| |
Key Strengths
- Data-driven: Based on actual resource usage, not guesses
- Auto mode: Continuously adjusts without manual intervention
- Min/max bounds: Prevents extreme recommendations
- Works with HPA: VPA for requests, HPA for replica count
Limitations
- Pod restart required: Changing requests forces pod restart (except with in-place VPA on Kubernetes 1.27+)
- Not for all workloads: StatefulSets and DaemonSets need careful configuration
- History dependency: Needs time to build accurate recommendations
Goldilocks: VPA Recommendations with a Dashboard
Goldilocks wraps VPA with a web dashboard that displays resource recommendations across all namespaces. It runs VPA in “Off” mode (recommendations only) and visualizes the results.
Installation
| |
| |
Accessing the Dashboard
| |
The dashboard shows:
- Current resource requests vs. VPA recommendations
- Historical resource usage graphs
- Namespace-level summaries
- Cost impact of right-sizing
Key Strengths
- Visualization: See all recommendations in one place
- Safe by default: Recommendations only — no automatic changes
- Multi-namespace: View recommendations across the entire cluster
- Cost awareness: Understand the financial impact of over/under-provisioning
Choosing the Right Tool
| Scenario | Best Choice | Why |
|---|---|---|
| Rebalance workloads across nodes | Descheduler | Evicts and re-schedules pods |
| Automatically right-size resource requests | VPA (Auto mode) | Adjusts requests based on usage |
| See recommendations before applying | Goldilocks | Dashboard + safe recommendations |
| Reduce cluster node count | Descheduler | LowNodeUtilization consolidation |
| Prevent OOM kills | VPA | Learns actual memory usage |
| Team collaboration on sizing | Goldilocks | Visual recommendations for review |
Using Them Together
The most effective approach is to use all three:
- Goldilocks identifies right-sizing recommendations across namespaces
- VPA applies the recommendations (in Auto mode or after review)
- Descheduler ensures pods are well-distributed after resource changes
| |
Why Resource Optimization Matters
In Kubernetes, every pod requests CPU and memory resources. These requests determine scheduling decisions, node capacity planning, and cluster autoscaling. But most teams set requests based on guesswork or copy-pasted values.
The consequences are significant:
- Over-provisioning: Requesting 2 CPU when 200m is needed wastes 90% of allocated resources. Multiply this across hundreds of pods and you’re paying for idle capacity.
- Under-provisioning: Requesting too little memory causes OOM kills. Requesting too little CPU causes throttling, increasing latency.
- Node waste: Poorly sized pods prevent efficient bin-packing, leading to underutilized nodes that still cost money.
Resource optimization tools turn guesswork into data-driven decisions. VPA learns from actual usage, Descheduler corrects scheduling drift, and Goldilocks makes recommendations visible to the whole team.
For cluster-level autoscaling, see our Karpenter vs Cluster Autoscaler vs KEDA guide. For node management and health monitoring, the Node Problem Detector vs NFD vs Goldilocks article covers node-level optimization. For cluster management platforms, our Rancher vs KubeSpray vs Kind comparison covers the infrastructure layer.
Resource optimization tools turn guesswork into data-driven decisions. VPA learns from actual usage, Descheduler corrects scheduling drift, and Goldilocks makes recommendations visible to the whole team.
For cluster-level autoscaling, see our Karpenter vs Cluster Autoscaler vs KEDA guide. For node management and health monitoring, the Node Problem Detector vs NFD vs Goldilocks article covers node-level optimization. For cluster management platforms, our Rancher vs KubeSpray vs Kind comparison covers the infrastructure layer. Together, they form a continuous optimization loop that adapts to changing workload patterns.
Karpenter vs Cluster Autoscaler vs KEDA guide. For node management and health monitoring, the Node Problem Detector vs NFD vs Goldilocks article covers node-level optimization.
FAQ
Can VPA and HPA work together?
Yes, but with caveats. VPA should manage resource requests (cpu/memory) while HPA manages replica count. However, VPA and HPA should not both manage the same resource. The recommended pattern: VPA controls CPU/memory requests, HPA controls replicas based on custom metrics (RPS, queue depth, etc.).
Does Descheduler disrupt running applications?
Descheduler respects PodDisruptionBudgets (PDBs) and only evicts pods when safe to do so. The nodeFit parameter ensures pods are only evicted if there is a suitable node to reschedule them on.
How long does VPA need to generate accurate recommendations?
VPA typically needs 8-24 hours of historical data to generate initial recommendations. Accuracy improves over time as more usage data is collected. For workloads with variable patterns (batch jobs, cron jobs), VPA may need several days.
Can Goldilocks automatically apply recommendations?
No. Goldilocks runs VPA in “Off” mode, which means it only generates recommendations. To auto-apply, you need to switch VPA to “Auto” mode or use the kubectl patch command to apply the recommended values manually.
What happens if Descheduler evicts all pods on a node?
Descheduler’s strategies are designed to avoid this. The LowNodeUtilization strategy only acts when nodes are below a threshold, and the nodeFit parameter ensures pods have a place to go. PDBs also prevent mass evictions.
Is VPA safe for production workloads?
VPA’s “Initial” mode is safe — it only sets requests on pod creation. “Auto” mode triggers pod restarts when changing requests, which may cause brief downtime. For critical workloads, use “Initial” mode or review Goldilocks recommendations before applying.