K8s Right-Sizing¶
Over-provisioned pods waste money and hide real utilization. Oracle finds consolidation opportunities your kube-scheduler misses.
Prerequisites¶
- CloudSlash installed and initialized
kubectlconfigured and pointing to your cluster- K8s plugin installed:
cs plugin install k8s
Scan Your Cluster¶
The K8s plugin scans all namespaces: pods, services, deployments, daemonsets, statefulsets, and more. Results appear immediately in the table output.
Insights Tab¶
View Findings in the
Open http://localhost:8080 → Insights tab. Look for:
- Over-provisioned pods: CPU/memory requests far exceed actual usage
- Idle services: services with no backing pods or zero traffic
- Ghost namespaces: namespaces with no active workloads
- Orphaned PVCs: persistent volume claims not mounted by any pod
Bin Packing¶
Review the 2D Analysis
The Tetris engine in CloudSlash models your cluster as a 2D bin packing problem. It fits workloads into nodes by CPU and memory simultaneously, using Best Fit Decreasing (BFD) to find the tightest valid packing.
In the Solver Results section of the Insights tab, you see:
- Current node utilization vs. optimal packing
- How many nodes could be removed while fitting all workloads
- Estimated monthly savings from the right-sized cluster
DEVI Recommendations¶
Ask for
In the TUI, press / to open the AI prompt bar and ask:
DEVI queries the Universal Graph directly and returns precise answers with resource CRNs, costs, and recommended actions.
Track Improvements¶
After applying right-sizing changes, run the next scan and compare:
Common Findings¶
| Finding | Heuristic | Typical Cause |
|---|---|---|
| Idle pod | idle_pod |
Deployment scaled to zero, not removed |
| Ghost namespace | empty_namespace |
Dev environment abandoned |
| Orphaned PVC | unbound_pvc |
StatefulSet deleted, PVC left behind |
| Over-requested deployment | over_provisioned_workload |
Copy-paste resource limits from prod |
What's Next¶
- Cloud Cost Optimization: Extend to AWS/GCP/Azure resources
- DEVI AI Remediation: Use AI to generate right-sizing plans
- Authoring Heuristics: Write custom K8s detection rules