Skip to content

Instantly share code, notes, and snippets.

@cardil
Last active July 17, 2025 17:51
Show Gist options
  • Save cardil/11ada21276e0453555358b9ba25ecb1d to your computer and use it in GitHub Desktop.
Save cardil/11ada21276e0453555358b9ba25ecb1d to your computer and use it in GitHub Desktop.
Paper prototype on how HPA with custom KPA scaler may look like
--- a
+++ b
-apiVersion: autoscaling/v2
+apiVersion: autoscaling/v3
kind: HorizontalPodAutoscaler
metadata:
name: php-apache
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: php-apache
minReplicas: 1
maxReplicas: 10
+ algorithm: custom://scaler-api.kpa.svc
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50
+ - type: KPA
+ kpa:
+ name: requests_per_second
+ target:
+ type: Average
+ value: 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment