Kubernetes HPA underutilized
info

Description HPA {{ $labels.namespace }}/{{ $labels.horizontalpodautoscaler }} is constantly at minimum replicas for 50% of the time. Potential cost saving here.
Query
>>>
	
				
					
					
						max
					
				
			
				
					(
				
			
				
					
					
						quantile_over_time
					
				
			
				
					(0.5, 
				
			
				
					
				
			
				
					[1d]) == 
				
			
				
					
				
			
				
					) by (horizontalpodautoscaler) > 3
				
			
    
Query Explanation

The rule computes the 50th‑percentile (median) of kube_horizontalpodautoscaler_status_desired_replicas over the last 1 day for each HPA and checks if that median equals the HPA’s configured spec.min_replicas. If more than three HPAs have this condition (i.e., they spend at least half the day at their minimum replica count), the alert fires.

Get Alert
Download
Copy to Clipboard