Scaling based on CPU usage.

This commit is contained in:
Tom Alexander
2021-07-24 22:36:48 -04:00
parent fc7e54ea8a
commit c1d18e0fe5

View File

@@ -48,3 +48,17 @@ spec:
ports: ports:
- port: 80 - port: 80
targetPort: "http" targetPort: "http"
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: autoscale-test
namespace: default
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: autoscale-test
minReplicas: 1
maxReplicas: 10
targetCPUUtilizationPercentage: 50