Right-sizing Guide
This guide walks you through optimizing workload resource requests and limits to reduce costs while maintaining performance.
Want to understand how right-sizing works? → See Right-sizing Concepts
Prerequisites
Before starting:
- Workload running (recommendations available immediately based on actual usage)
- 7+ days of data for time-based pattern detection (ghost town analysis for busy/idle hours)
- Resource requests and limits already defined (our users can detect workloads that doesn't have any requests/limits defined at Best practices page)
- Access to Kubeadapt Available Savings page
- kubectl access to cluster
- Non-production environment for testing (recommended)
Step-by-Step Process
Step 1: Identify Candidates
- Go to Dashboard → Available Savings
- Filter by "Right-Sizing" category
- Sort by "Savings" to prioritize high-impact workloads
Step 2: Analyze Current Usage
Click on a workload to view resource usage charts and check:
- P99 Usage - Spike patterns
- Volatility - Usage stability
- Incidents - OOM kills or throttling
- Traffic Patterns - Busy vs. idle hours
Step 3: Review Recommendations
Review the recommendation in the workload details page and validate:
- P99 fits comfortably in new limits with buffer
- No recent incidents or scaling events
- Safety margins adequate (30%+ above P99)
Step 4: Test in Staging First
Apply the recommended values to a staging deployment and monitor for 7 days in Kubeadapt dashboard.
Step 5: Apply to Production
Copy the recommended values from the workload details page:
text1CPU Request: 400m (currently 1000m) 2CPU Limit: 800m (currently 2000m) 3Memory Request: 768Mi (currently 2Gi) 4Memory Limit: 1536Mi (currently 4Gi)
Apply changes:
- GitOps (Recommended): Update your repository (values.yaml, kustomization, etc.), create PR, and merge
- Manual: Use kubectl patch or edit deployment YAML directly
Monitor the rollout and watch for pod restarts
Step 6: Confirm Savings
Monitor resource usage in Kubeadapt dashboard and confirm cost reduction as expected.
Gradual Rollout
Don't optimize everything at once:
text1Week 1: Start Small 2├─ Non-critical workloads 3├─ Non-production environments 4└─ Build confidence 5 6Week 2: Medium Impact 7├─ Complete all Non-critical workloads for Non-production environments 8├─ Critical workloads for Non-production environments 9├─ Start promoting Non-critical workloads to production environments 10├─ Start monitoring Medium-traffic at production services 11 12Week 3: High Impact 13├─ Complete optimizing all workloads for Non-production environments 14├─ Non-critical workloads for production environments 15├─ Start critical production workloads 16 17Week 4: Remaining Workloads 18├─ Complete optimization 19├─ Calculate total savings 20└─ Document lessons learned
We welcome your feedback and would greatly appreciate it if you could share your experiences with us.
Automation & Continuous Optimization
Kubeadapt's cost analysis and dashboarding capabilities enable teams to quickly identify optimization opportunities and rightsize their services, minimizing resource waste. However, infrastructure teams still need to apply these optimizations to workloads.
To minimize the time infrastructure teams spend on optimization and maximize ROI, we're building Cost Gates — a shift-left approach that integrates continuous optimization directly into the infrastructure development lifecycle (SDLC).
Cost Gates (Alpha)
Cost Gates is currently in Alpha and provides:
GitOps-First Approach:
- Full respect for GitOps principles
- All optimization changes are trackable and auditable through Git repositories (where deployment manifests exist)
- No direct apply calls to Kubernetes clusters — infrastructure teams maintain complete control
Automated Optimization Workflow:
- Infrastructure teams no longer need to manually optimize bot-managed workloads
- Optimization process is reduced to reviewing and approving pull requests (it can also be automerged for different types of workloads and thresholds).
- Time savings: Infrastructure teams can save hours per week by delegating optimization analysis to automation
How it works:
- Kubeadapt Bot analyzes recommendations
- Creates pull requests with proposed optimizations
- Infrastructure team reviews and approves
- Changes applied through standard GitOps workflow
→ Setup Cost Gates for detailed configuration and integration steps