diff --git a/kubernetes/autoscale/k8s/autoscale.yaml b/kubernetes/autoscale/k8s/autoscale.yaml index 8e0a1f9..cee08e1 100644 --- a/kubernetes/autoscale/k8s/autoscale.yaml +++ b/kubernetes/autoscale/k8s/autoscale.yaml @@ -49,7 +49,7 @@ spec: - port: 80 targetPort: "http" --- -apiVersion: autoscaling/v1 +apiVersion: autoscaling/v2beta2 kind: HorizontalPodAutoscaler metadata: name: autoscale-test @@ -61,4 +61,10 @@ spec: name: autoscale-test minReplicas: 1 maxReplicas: 10 - targetCPUUtilizationPercentage: 50 + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 50