Switch to new way to specify cpu usage.

This commit is contained in:
Tom Alexander 2021-07-24 23:10:52 -04:00
parent 3654b13a66
commit 7167e3fa32
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -49,7 +49,7 @@ spec:
- port: 80 - port: 80
targetPort: "http" targetPort: "http"
--- ---
apiVersion: autoscaling/v1 apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
metadata: metadata:
name: autoscale-test name: autoscale-test
@ -61,4 +61,10 @@ spec:
name: autoscale-test name: autoscale-test
minReplicas: 1 minReplicas: 1
maxReplicas: 10 maxReplicas: 10
targetCPUUtilizationPercentage: 50 metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50