Inventory Order App Yamls / Part Inventory HPA

TrackKubernetes Learning Journey
Current SectionDeployments
Progress57 of 271
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: part-inventory-hpa
spec:
  maxReplicas: 3
  minReplicas: 2
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: part-inventory-service
  metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          type: Utilization
          averageUtilization: 70
    - type: Resource
      resource:
        name: memory
        target:
          type: Utilization
          averageUtilization: 80
    - type: Resource
      resource:
        name: requests_per_second
        target:
          type: AverageValue
          averageValue: 100