How to Use

Resource Recommendations in Agentkube IDE
Prerequisites
To use the Resource Recommender feature, ensure:- Prometheus is integrated with Agentkube IDE
- Prometheus is scraping cAdvisor metrics for container resource usage
- kube-state-metrics is deployed for Kubernetes object metadata
- Metric retention period covers at least 14 days for optimal recommendations
- Scrape interval is configured appropriately (typically 15-30 seconds)
- Navigate to the Workloads section
- Select Pods from the workload types
- Click on the Action button for the desired pod
- Select Telemetry from the dropdown menu
- Navigate to the Recommendation tab
- View CPU and memory recommendations based on historical data
Recommendation Strategy
Agentkube implements an intelligent recommendation strategy that balances resource efficiency with workload stability.CPU Recommendations
Request Calculation:- Based on the 95th percentile of historical CPU usage
- Allows pods to burst above the request when needed
- No CPU limit is set by default to permit bursting
container_cpu_usage_seconds_total
Memory Recommendations
Request/Limit Calculation:- Based on peak memory usage over the historical period
- Adds a 15% buffer to prevent OOM kills
- Sets both request and limit to the same value for predictability
container_memory_working_set_bytes
Data Requirements
The Resource Recommender requires 100+ historical datapoints to generate reliable recommendations. By default, it analyzes 14 days of historical data to capture regular usage patterns, peak load scenarios, and daily/weekly cycles.Metrics Used
The Resource Recommender leverages the following Prometheus metrics for analysis:Core Metrics
Supporting Metrics
OOM Kill Detection
When Out-Of-Memory (OOM) kill events are detected, the Resource Recommender automatically adjusts recommendations:- Applies a 25% memory buffer (instead of 15%)
- Considers historical memory limits that were exceeded
- Helps prevent future OOM kills
kube_pod_container_resource_limitskube_pod_container_status_last_terminated_reason

